From: aiso at chawerim dot nl
Operating system: window xp
PHP version: 5.3.0
PHP Bug Type: Filesystem function related
Bug description: file_exists fails for files on network share
Description:
------------
file_exists() fails for files on network share. Although these files can
be perfectly read by e.g. file_get_contents(). So these files really do
exist!
file_exists() works without problems for files not on a share such as
'C:\Program Files\PHP\php.ini'.
Can reproduce also with '\\\\.HOST\\SHARED FOLDERS\\data\\php.ini'
Using php 5.3.0 (VC9 x86 Non Thread Safe (2009-Jun-30 08:52:54)) on
windows XP Pro SP3.
safe_mode is off.
This is tested on windows console (cmd.exe). User is admin and is allowed
to go and read files on this share.
Reproduce code:
---------------
$file = '//.HOST/SHARED FOLDERS/data/php.ini';
error_log(substr(file_get_contents($file),0,100));
if (file_exists($file)) {
error_log("does exist");
} else {
error_log("does not exist");
}
Expected result:
----------------
First 100 characters of php.ini file + 'does exist'
Actual result:
--------------
First 100 characters of php.ini file + 'does not exist'
--
Edit bug report at http://bugs.php.net/?id=50220&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50220&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50220&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50220&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50220&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50220&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50220&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50220&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50220&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50220&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50220&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50220&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50220&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50220&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50220&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50220&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50220&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50220&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50220&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50220&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50220&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50220&r=mysqlcfg