#38423 [NEW]: unexpected warning with file_exists() and open_base_dir

From: Date: Fri, 11 Aug 2006 10:30:52 +0000
Subject: #38423 [NEW]: unexpected warning with file_exists() and open_base_dir
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100683@lists.php.net to get a copy of this message
From: lars at schafft dot org Operating system: Linux SuSE 9.2 PHP version: 5.1.4 PHP Bug Type: Safe Mode/open_basedir Bug description: unexpected warning with file_exists() and open_base_dir Description: ------------ Trying to check if a file to include exists. Path, where file to be checked, is in open_base_dir. But if the file does not exists, the function throws a warning concerning open_basedir restrictions Reproduce code: --------------- if (file_exists('/opt/cms/modules/stats/frontend/stats.parser.html.class.php')) { echo 'found'; } Expected result: ---------------- file_exists() returns false without a warning Actual result: -------------- Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/opt/cms/modules/stats/frontend/stats.parser.html.class.php) is not within the allowed path(s): (/srv/www/htdocs/web2:/usr/lib/php:/opt/cms -- Edit bug report at http://bugs.php.net/?id=38423&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38423&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38423&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38423&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38423&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38423&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38423&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38423&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38423&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38423&r=support Expected behavior: http://bugs.php.net/fix.php?id=38423&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38423&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38423&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38423&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38423&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38423&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38423&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38423&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38423&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38423&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38423&r=mysqlcfg

« previous php.bugs (#100683) next »