php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31092 open_basedir restriction problem with symlink and current directory
Submitted: 2004-12-14 17:28 UTC Modified: 2005-01-31 22:50 UTC
From: groenendijk at frg dot eur dot nl Assigned:
Status: Not a bug Package: Safe Mode/open_basedir
PHP Version: 4.3.9 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: groenendijk at frg dot eur dot nl
New email:
PHP Version: OS:

 

 [2004-12-14 17:28 UTC] groenendijk at frg dot eur dot nl
Description:
------------
this is a bug similar to #30188

my current dir is a symlink to another directory:
/www/html/userfiles/groenendijk -> /mnt/somedrive/html

open_basedir has value:
".:/usr/local/sharedfunc"

when i call a script like this:
<%
include './test2.php';
%>

i get the following
Warning: main(): Failed opening './test2.php' for inclusion (include_path='.:/usr/local/sharedfunc') in /www/html/userfiles/groenendijk/test1.php on line xx

In my opinion this should be working.

Expected result:
----------------
i expect includes to the current directory to work
even if this current directory is a symlink

Actual result:
--------------
Warning: main(): Failed opening './test2.php' for inclusion (include_path='.:/usr/local/sharedfunc') in /www/html/userfiles/groenendijk/test1.php on line xx


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-14 17:39 UTC] groenendijk at frg dot eur dot nl
rebooted server,
some strange dependency problem because it was fixed afterwards
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 13:01:27 2024 UTC