#50220 [Opn->Fbk]: file_exists fails for files on network share

From: Date: Wed, 18 Nov 2009 15:15:19 +0000
Subject: #50220 [Opn->Fbk]: file_exists fails for files on network share
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-144752@lists.php.net to get a copy of this message
 ID:               50220
 Updated by:       pajoye@php.net
 Reported By:      aiso at chawerim dot nl
-Status:           Open
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: window xp
 PHP Version:      5.3.0
 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------

[2009-11-18 14:55:48] aiso at chawerim dot nl

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 this bug report at http://bugs.php.net/?id=50220&edit=1



Thread (6 messages)

« previous php.bugs (#144752) next »