#41735 [NEW]: file_exists reports incorrect results

From: Date: Tue, 19 Jun 2007 01:45:54 +0000
Subject: #41735 [NEW]: file_exists reports incorrect results
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-113916@lists.php.net to get a copy of this message
From: php-bug at okra dot org Operating system: Windows Server 2003 PHP version: 5.2.3 PHP Bug Type: Filesystem function related Bug description: file_exists reports incorrect results Description: ------------ file_exists() returns strange results in PHP 5.2.3. This worked fine in 5.2.1. The "Actual result" below is from PHP 5.2.1 on the same server. Reproduce code: --------------- <?php header('Content-type: text/plain'); foreach (array('d:/home', 'd:/home/domain.com', 'd:/home/domain.com/phpinfo.php', 'c:/WINDOWS', 'c:/WINDOWS/system32', 'c:/bogus') as $file) { echo "$file: " . (file_exists($file) ? 'yes' : 'no' ) . "\n"; } ?> Expected result: ---------------- d:/home: yes d:/home/domain.com: yes d:/home/domain.com/phpinfo.php: yes c:/WINDOWS: yes c:/WINDOWS/system32: yes c:/bogus: no Actual result: -------------- d:/home: yes d:/home/domain.com: no d:/home/domain.com/phpinfo.php: yes c:/WINDOWS: no c:/WINDOWS/system32: yes c:/bogus: no -- Edit bug report at http://bugs.php.net/?id=41735&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41735&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41735&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41735&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41735&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41735&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41735&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41735&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41735&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41735&r=support Expected behavior: http://bugs.php.net/fix.php?id=41735&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41735&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41735&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41735&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41735&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41735&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41735&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41735&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41735&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41735&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41735&r=mysqlcfg

« previous php.bugs (#113916) next »