|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-12-21 14:41 UTC] d_daemen at hotmail dot com
Description: ------------ scandir() cannot open UNC paths since PHP 5.3.1 (Running under IIS 6) I've upgraded from PHP 5.2.11 tot 5.3.1 and then this function does not work anymore. this problem i have also with readdir, opendir, & glob. PHP is configured on a virtual directory, i used the PHP 5.2.11 ISAPI module and use now the PHP 5.3.1 CGI Module. I tried following path's: $dir = "\\\\hdlsrv\\Company\\Documentatie"; $dir = "\\hdlsrv\Company\Documentatie"; $dir = "//hdlsrv/Company/Documentatie"; $dir = "///hdlsrv/Company/Documentatie"; IIS is configured to use 'integrated windows authentication' and 'digest authentication for windows domain servers'. When a user opens the page, php-cgi.exe is running as the users logon name. The user has access to the share. Reproduce code: --------------- <?php $dir = "\\\\hdlsrv\\Company\\Documentatie"; $files = scandir($dir); print_r($files); ?> Expected result: ---------------- Array ( [0] => . [1] => .. [2] => Article Ranges [3] => Bezoek Verslagen [4] => Demo cd [5] => Headline Info [6] => ParcRanges 2008 [7] => Software Manuals ) Actual result: -------------- Warning: scandir(\\hdlsrv\Company\Documentatie) [function.scandir]: failed to open dir: No such file or directory in K:\Intranet\docs.php on line 3 Warning: scandir() [function.scandir]: (errno 2): No such file or directory in K:\Intranet\docs.php on line 3 PHP Warning: scandir(\\hdlsrv\Company\Documentatie) [function.scandir]: failed to open dir: No such file or directory in K:\Intranet\docs.php on line 3 PHP Warning: scandir() [function.scandir]: (errno 2): No such file or directory in K:\Intranet\docs.php on line 3 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
Maybe it can help: I've noticed that with your patch, when using drive path to access file, file_exists('W:/path/to/my/file.txt') now returned TRUE (=the file exists) even if fopen/file/file_get_contents were unable to read it and say "No such file or directory"i do not have the problem wich blc at 3ds dot com has. I have a weird thing: when i install php 5.3.3 it works for the 1st time i run the script in the browser. after that it never works again. (also all other users not) when i remove php completely and reinstall it still does not work (also not the 1st time) when i wait 1 day, and install php again, it works again for the first time, and after F5 it wont never work again. when i try following commandline: C:\WINDOWS>c:\php53\php -f k:\intranet\doc.php i get following output: Array ( [0] => . [1] => .. [2] => Article Ranges [3] => Bezoek Verslagen [4] => Demo cd [5] => Headline Info [6] => ParcRanges 2008 [7] => Software Manuals ) and that output i get every time i run the commmand, also when i try as another user.