|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-23 03:01 UTC] phpdotnet at ericmarques dot com
[2006-06-14 17:48 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 04:00:01 2025 UTC |
Description: ------------ file_exists does not properly resolve symlinks before applying open_basedir on "include" scripts. in my situation /home is a symlink to /data/home open_basedir is set to /home/ericmarq/ apache documentroot is set to /home/ericmarq/public_html Server running cPanel, apache 1.3 This did not happen in php 4.4.2, only happened after upgrade to 5.1.2 Reproduce code: --------------- -- test1.php -- <?php include("test2.php"); ?> -- test2.php -- <?php if (!file_exists("/home/ericmarq/public_html/SUBDIR/does.not.exist.html")){ print "no"; } ?> Expected result: ---------------- no Actual result: -------------- Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/ericmarq/public_html/SUBDIR/does.not.exist.html) is not within the allowed path(s): (/home/ericmarq/) in /data/home/ericmarq/public_html/test2.php on line 2 no