|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-26 10:53 UTC] zend at oliwel dot de
[2006-12-26 11:07 UTC] tony2001@php.net
[2007-01-03 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 17:00:01 2025 UTC |
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