ID: 50542 Updated by: paj...@php.net Reported By: dd at headlineweb dot nl -Status: Open +Status: Feedback Bug Type: *Directory/Filesystem functions Operating System: win32 only - W2003 PHP Version: 5.3.1 -Assigned To: +Assigned To: pajoye New Comment:
I will test it once I'm back home after my holidays. However, I can say that it works just fine, having use this feature last week. Did you use impersonate? Or are you sure that the user running php has access to this share? Previous Comments: ------------------------------------------------------------------------ [2009-12-21 14:41:33] dd at headlineweb dot nl 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50542&edit=1