ID:               50542
 Updated by:       paj...@php.net
 Reported By:      dd at headlineweb dot nl
-Status:           Assigned
+Status:           Feedback
 Bug Type:         *Directory/Filesystem functions
 Operating System: win32 only - W2003
 PHP Version:      5.3.1
 Assigned To:      pajoye
 New Comment:

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.


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

[2010-01-08 15:32:06] bramus at bram dot us

Having the same issue here, cannot access *any* file on an UNC path via
fopen, file_put_contents, etc. Even file_exists returns false.

User has sufficient permissions (impersonate is active) + All worked
fine under PHP 5.2.x (Additionally: even if I set permissions for
"Everyone" to have full access to the given UNC path it will not work).

Running IIS7, PHP is configured as a FastCGI Module.

------------------------------------------------------------------------

[2009-12-21 14:49:11] dd at headlineweb dot nl

thanks pajoye,

yes, i use impersonate and the user has access to the share

------------------------------------------------------------------------

[2009-12-21 14:46:39] paj...@php.net

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?

------------------------------------------------------------------------

[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

Reply via email to