|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-29 12:05 UTC] tony2001@php.net
[2007-07-07 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 06:00:01 2025 UTC |
Description: ------------ You'll get a open_basedir related warning, if you try to access a symlink in open_basedir, but which points to a non-existent file: PHP Warning: file_exists(): open_basedir restriction in effect. File(symlink-exists-not) is not within the allowed path(s): (/tmp/open_basedir-symlinks) Reproduce code: --------------- $ ls -l . .. open_basedir-warning-if-symlink-does-not-exist.php symlink-exists -> . symlink-exists-not -> foo $ php -d open_basedir=`pwd` open_basedir-warning-if-symlink-does-not-exist.php open_basedir-warning-if-symlink-does-not-exist.php: --------------------------------------------------- <?php var_dump( file_exists('symlink-exists') ); var_dump( file_exists('symlink-exists-not') ); var_dump( file_exists($_SERVER['argv'][0]) ); var_dump( file_exists('does-not-exist') ); ?> --------------------------------------------------- Expected result: ---------------- bool(true) bool(false) bool(true) bool(false) Actual result: -------------- bool(true) PHP Warning: file_exists(): open_basedir restriction in effect. File(symlink-exists-not) is not within the allowed path(s): (/tmp/open_basedir-symlinks) in /tmp/open_basedir-symlinks/open_basedir-warning-if-symlink-does-not-exist.php on line 3 bool(false) bool(true) bool(false)