ID: 50542 Updated by: paj...@php.net Reported By: dd at headlineweb dot nl Status: Feedback Bug Type: *Directory/Filesystem functions Operating System: win32 only - W2003 PHP Version: 5.3.1 Assigned To: pajoye New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2010-01-20 11:49:15] paj...@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 ------------------------------------------------------------------------ [2010-01-08 19:57:53] bramus at bram dot us pajoye, I can provide you with an FTPS/WEB account on the server so that you can run some test files on it; I hope that's sufficient enough (or at least "a start") as I can not give you full access (viz. RDP access w. Admin privileges) to the server. Regards, Bram. ------------------------------------------------------------------------ [2010-01-08 16:49:34] paj...@php.net It works just fine here, using WS03 as server (where the UNC path is) or client (fetching from). If one of you can give me a remote access to debug, I could help. But I'm not able to reproduce this problem using any of the tests system I use. ------------------------------------------------------------------------ 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