|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-24 04:16 UTC] felipe@php.net
-Status: Open
+Status: Feedback
[2010-04-24 04:16 UTC] felipe@php.net
[2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 04:00:02 2025 UTC |
Description: ------------ I have PHP 5.3.1 installed ad apache module with apache version Apache/2.2.14. I configured a virtual host with the directive: php_admin_value open_basedir "/usr/share/pear:/home:/var/www/hosts:/tmp" The script is into the path: /home/user/web/test.php and there is a symbolik link from "/var/www/hosts/domain.tld" to "/home/user/web" When I try to execute a file_exists on a path like this: /var/www/hosts/domain.tld/test.php/testfile.file Where "test.php" is a FILE and not a DIRECTORY On all the other cases, no errors. The special condition is the symbolink link and the filename in the path (like it's a directory). Reproduce code: --------------- var_dump(file_exists("/var/www/hosts/domain.tld/test.php/testfile.file")); // Where "test.php" is a FILE and not a DIRECTORY, and domain.tld is a symbolink link to another directory. Expected result: ---------------- bool(false) Actual result: -------------- Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/hosts/domain.tld/test.php/testfile.file) is not within the allowed path(s): (/usr/share/pear:/home:/var/www/hosts:/tmp) in /home/user/web/test.php on line 1