#39953 [Opn->Fbk]: chdir(..) not working in open_basedir where chdir(../) does !

From: Date: Tue, 26 Dec 2006 11:07:48 +0000
Subject: #39953 [Opn->Fbk]: chdir(..) not working in open_basedir where chdir(../) does !
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106891@lists.php.net to get a copy of this message
ID: 39953 Updated by: tony2001@php.net Reported By: zend at oliwel dot de -Status: Open +Status: Feedback Bug Type: Directory function related Operating System: Linux PHP Version: 5.2.0 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-12-26 10:53:23] zend at oliwel dot de is not working with OPEN_BASEDIR turned on - nothing to do with safe_mode.... ------------------------------------------------------------------------ [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

« previous php.bugs (#106891) next »