ID:               39953
 User updated by:  zend at oliwel dot de
 Reported By:      zend at oliwel dot de
 Status:           Open
 Bug Type:         Directory function related
 Operating System: Linux
 PHP Version:      5.2.0
 New Comment:

is not working with OPEN_BASEDIR turned on - nothing to do with
safe_mode....


Previous Comments:
------------------------------------------------------------------------

[2006-12-26 10:50:41] zend at oliwel dot de

Description:
------------
Set open_basedir to /myscript
Try to do 'chdir("..")' from a file in /myscript/dir/ results in an
open_basedir exception.
Using chdir("../") instead works.
PHPMyAdmin uses chdir("..") in the css/ directory, is not working with
safemode turned on.



Reproduce code:
---------------
<?
// create directory bugme before executing the script
error_reporting(E_ALL);
chdir("bugme");
echo getcwd();
chdir("..");
echo getcwd();
chdir("../");
?>

Expected result:
----------------
Directory Change to upper directory on first call

Actual result:
--------------
Warning: chdir() [function.chdir]: open_basedir restriction in effect.
File(..) is not within the allowed path(s): (/webtree/htdocs/sql/) in
/webtree/htdocs/sql/test.php 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39953&edit=1

Reply via email to