|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-06-10 04:03 UTC] dsp@php.net
-Status: Open
+Status: Bogus
[2011-06-10 04:03 UTC] dsp@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 19:00:02 2025 UTC |
Description: ------------ is_dir throws an error if: - open_basedir is in effect - called upon a file - the path is terminated with a slash CLI Tested on Windows: php -d open_basedir=/ -r "var_dump(is_dir('C:/Windows/write.exe'));" #bool(false) php -d open_basedir=/ -r "var_dump(is_dir('C:/Windows/write.exe/'));" #warning CLI Not tested on Linux, should be like this: php -d open_basedir=/ -r "var_dump(is_dir('/etc/fstab'));" Apache2 module tested on Debian, see test script. Test script: --------------- <?php echo PHP_VERSION . PHP_EOL; ini_set('display_errors', true); error_reporting(E_ALL); var_dump(is_dir(__FILE__ . '/')); Expected result: ---------------- 5.2.9-0.dotdeb.1 bool(false) Actual result: -------------- 5.3.5-0.dotdeb.0 Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/blah/subdomains/bleah/httpdocs/phpinfo.php/) is not within the allowed path(s): (/var/www/vhosts/blah/subdomains/bleah/httpdocs:/tmp) in /var/www/vhosts/blah/subdomains/bleah/httpdocs/phpinfo.php on line 7 bool(false)