ID: 50542
User updated by: dd at headlineweb dot nl
Reported By: dd at headlineweb dot nl
-Status: Feedback
+Status: Open
Bug Type: *Directory/Filesystem functions
Operating System: win32 only - W2003
PHP Version: 5.3.1
Assigned To: pajoye
New Comment:
pajoye, Yes we use DFS on 2 windows 2003 R2 servers
Previous Comments:
------------------------------------------------------------------------
[2010-01-20 11:51:51] pajoye@php.net
blc at 3ds dot com, which OS do you use? On the server and where PHP
runs.
------------------------------------------------------------------------
[2010-01-20 11:50:13] pajoye@php.net
DFS are the only case that may cause issues. I was not able to
reproduce any other UNC related issues, mounted as drive or path,
accessing directly using the UNC path, etc.
------------------------------------------------------------------------
[2010-01-20 11:49:15] pajoye@php.net
Do you use DFS?
------------------------------------------------------------------------
[2010-01-20 11:43:19] blc at 3ds dot com
I have exactly the same problem since I moved from PHP 5.2 to 5.3.1
I have it using PHP in command line too when reading remote files
through UNC path AND through drive: path.
Here is a sample code:
====================================================================
<?php
error_reporting(E_ALL);
$file="intel_a/RebasingDrop1.txt";
echo "CWD=".getcwd()."\n";
echo "FILE=$file\n";
// No permission problems to access the file
echo ls -l $file."\n";
echo head $file."\n";
// file_exists don't see it
echo (file_exists($file)?"file $file EXISTS":"file $file not
found")."\n";
// opening it always fail
echo (fopen($file,'r')===FALSE?"Open FAILED":"Open
worked")."\n";
echo (file($file)===FALSE?"File FAILED":"File worked")."\n";
echo (file_get_contents($file)===FALSE?"file_get_contents
FAILED":"file_get_contents worked")."\n";
?>
====================================================================
Here is the result when running the script from W: (which is mapped on
\\server\share)
====================================================================
CWD=W:\CXR20rel\BSF
FILE=intel_a/RebasingDrop1.txt
-r-xr-xr-a 1 DS\BSFR DS\Domain+Users 6751 Oct 7 2002
intel_a/RebasingDrop1.txt
CATSYSPROXY.DLL
CATAPPLICATIONFRAME.DLL
JS0GROUP.DLL
JS0SPEXT.DLL
CATSYSMULTITHREADING.DLL
CATSYSALLOCATOR.DLL
JS0FM.DLL
CATINFINTERFACES.DLL
CATSYSCOMMUNICATION.DLL
CATAUTOITF.DLL
file intel_a/RebasingDrop1.txt not found
Warning: fopen(intel_a/RebasingDrop1.txt): failed to open stream: No
such file or directory in E:\NoSave\DepsGraph_V7\release\bug.php on line
12
Open FAILED
Warning: file(intel_a/RebasingDrop1.txt): failed to open stream: No
such file or directory in E:\NoSave\DepsGraph_V7\release\bug.php on line
13
File FAILED
Warning: file_get_contents(intel_a/RebasingDrop1.txt): failed to open
stream: No such file or directory in
E:\NoSave\DepsGraph_V7\release\bug.php on l
ine 14
file_get_contents FAILED
====================================================================
Here is the result when running the script from \\server\share
====================================================================
file intel_a/RebasingDrop1.txt not found
Warning: fopen(intel_a/RebasingDrop1.txt): failed to open stream: No
such file or directory in E:\NoSave\DepsGraph_V7\release\bug.php on line
12
Open FAILED
Warning: file(intel_a/RebasingDrop1.txt): failed to open stream: No
such file or directory in E:\NoSave\DepsGraph_V7\release\bug.php on line
13
File FAILED
Warning: file_get_contents(intel_a/RebasingDrop1.txt): failed to open
stream: No such file or directory in
E:\NoSave\DepsGraph_V7\release\bug.php on l
ine 14
file_get_contents FAILED
====================================================================
------------------------------------------------------------------------
[2010-01-09 08:47:16] dd at headlineweb dot nl
The server where PHP is running has RDP enabled, but our system
administrator does not give permission.
if you want to do some test, maybe i can do the tests for you?
BTW: the call is as follows
Client --HTTP--> W2003 Server --UNC--> Another W2003 Server
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50542
--
Edit this bug report at http://bugs.php.net/?id=50542&edit=1