|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-05-25 18:07 UTC] softwareelves at gmail dot com
[2013-12-24 23:40 UTC] aaron dot hamid at gmail dot com
[2013-12-24 23:50 UTC] aaron dot hamid at gmail dot com
[2015-06-04 14:50 UTC] cmb@php.net
-Status: Verified
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2015-06-04 14:50 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 06:00:01 2025 UTC |
Description: ------------ When using open_basedir as a prefix, attempting to access files or directories which match the prefix but are not present on the filesystem raise open_basedir restriction warnings. Reproduce code: --------------- // create files or directories on the file system "/foo1", "/foo2" // add "/foo" (not "/foo/") to the open basedir restriction, then: var_dump(file_exists('/foo1')); var_dump(file_exists('/foo2')); var_dump(file_exists('/foo3')); Expected result: ---------------- this is the output returned: bool(true) bool(true) bool(false) which is expected, however, the "false" returned by the third call is disingenuous... it is false because the call is being blocked by open_basedir, and the following warning is triggered: [Fri May 2 17:33:05 2008] [error] PHP Warning: file_exists(): open_basedir restriction in effect. File(/foo3) is not within the allowed path(s)