Edit report at http://bugs.php.net/bug.php?id=50542&edit=1

 ID:               50542
 Updated by:       paj...@php.net
 Reported by:      dd at headlineweb dot nl
 Summary:          scandir() cannot open UNC paths since PHP 5.3.1
-Status:           Open
+Status:           Feedback
 Type:             Bug
 Package:          *Directory/Filesystem functions
 Operating System: win32 only - W2003
 PHP Version:      5.3.1
 Assigned To:      pajoye

 New Comment:

It may be different in the various IIS versions (different ways to
configure it, between 5, 6 or 7.x) but the principle is exactly the
same.



We have tested using IIS6 and 7.x and it works perfectly.


Previous Comments:
------------------------------------------------------------------------
[2010-03-23 11:57:27] dd at headlineweb dot nl

But the above solution does not apply IIS 6, Only > 7?

------------------------------------------------------------------------
[2010-03-09 17:01:23] bramus at bram dot us

Hi Pajoye,



my last comment was wrong (had a cached version of a test I ran,
therefore I had wrong results).



The correct solution is to actually set the "Physical Path Credentials"
and leave "Physical Path Credentials Logon Type" as it is (viz.
"ClearText").



This however raises an IIS bug that the credentials of the Application
Pool don't get passed to the path correctly, although it's set to take
over the App Pool credentials.



Anywho, for now the issue indeed is solved indeed; A tad bit of
documentation would be handy indeed ;-)



Regards,

B!

------------------------------------------------------------------------
[2010-03-09 16:42:14] paj...@php.net

Ah! I was beginning to think that I was either stupid, blind or both :)



Can I consider this issue as solved (but need to be documented,
cruelly)?

------------------------------------------------------------------------
[2010-03-09 16:26:05] bramus at bram dot us

Hi Pajoye,



thanks for your fast reply. I've dugg a bit deeper (thanks to your link)
and got it working by leaving ""Physical Path Credentials" untouched
(viz. take over the credentials from the Application Pool) and by
changing the "Physical Path Credentials Logon Type" from "ClearText" to
"Network".



By doing so it now works fine.



Regards and thanks for your help,

Bram.

------------------------------------------------------------------------
[2010-03-09 15:59:47] paj...@php.net

hi Bram,



This doc (IIS link) is incomplete, it is important to remember that the
IUSR(_xxx) is impersonate and anonymous. See:



http://support.microsoft.com/kb/207671



This user also has limitations per default, which limits access to
remote resources. The reasons and possible workarounds are explain in
this kb.



PHP 5.2 impersonation was only partial and fails to actually run a
process under the choosen users.



We have tested 5.3 share access (normal shares or DFS) successfully
using 2k3, 2k8 (incl. R2 for both). To test it:



- create a user´(site1user for example)

- Open the IIS manager

- change the Physical Path Credentials (iis 7.x) and set it to this new
users

- be sure that this user has access to the remote shares

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


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/bug.php?id=50542


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=50542&edit=1

Reply via email to