Edit report at http://bugs.php.net/bug.php?id=52376&edit=1
ID: 52376
User updated by: ryan at kisc dot edu dot np
Reported by: ryan at kisc dot edu dot np
Summary: opendir() cannot open UNC paths in IIS7 using
passthrough auth.
-Status: Feedback
+Status: Assigned
Type: Bug
Package: *Directory/Filesystem functions
Operating System: win64 - W2008R2
PHP Version: 5.3.2
Assigned To: pajoye
New Comment:
Well, that allows me to browse to the folder via chrome and essentially
does the
same thing as the
workaround from #50542 but only on the one folder which could work. What
it does
not appear to do
is give me programmatic access to the folder. The instructions in that
KB are
outdated as it uses
adsutil.vbs and the setting is the same as the "Physical Path
Credentials" from
the IIS manager.
This could work, in a much less than ideal way, if there is some way to
run
"opendir" on the
virtual directory without specifying the unc path (since the UNC path
itself
still does not work).
I could just be unaware of how, since it seems to use the system paths
and not
honor or even
acknowledge virtual directories. I tried lots of different formats
against my
better judgement but
none worked. I even tried using the http path reference. Still no joy.
I've used
PHP since 1998 but
realize something could have changed at any one of the releases, however
I'm not
sure I see how a
virtual directory could solve the ability to use opendir. Fair enough if
this
was just a try. I'm
happy to keep trying if it can help the community. This worked
fabulously in
IIS6. I also confess
that it appears to be Microsoft's fault. Very frustrating.
I wonder if I can create a symbolic link equivalent. I've done this
before in
older versions of
windows, but I don't think I've ever done it to a network share. In my
case I
may be able to just
move the share to the IIS server and be done with it, but I'm willing to
stick
this out if it will
help find a solution to this issue.
Previous Comments:
------------------------------------------------------------------------
[2010-07-19 23:50:21] [email protected]
Can you try to follow the advice here please:
http://support.microsoft.com/kb/214806
------------------------------------------------------------------------
[2010-07-19 12:38:30] ryan at kisc dot edu dot np
Description:
------------
This seems to be identical to #50542 but that one was closed and I
couldn't do anything to it.
Basically it was marked closed because with passthrough-authentication
essentially disabled by putting a username in "physical path
credentials" and selecting ClearText in the "Physical Path Credentials
Logon Type" both in advanced settings, this can be made to work so long
as that configuration is acceptable.
I too am having trouble with this and unfortunately the solution of
editing
physical path credentials breaks the pass through authentication to the
database, ldap, and other things. This all worked on 5.3.1 with IIS6 on
W2K3 but
on IIS7 with W2K8R2 no joy. So I upgraded to 5.3.2, still no joy. My
application is so reliant on the pass-through authentication that when I
do arrange things such that opendir works (clear-text + specific
physical path credentials) the system becomes a single user system!
So I can confirm the workaround mentioned for #50542 works if the
environment allows for it, but mine does not. Any other ideas? If I
connect to IIS using the environment requirement of network type auth
and pass-through authentication it does NOT work, though it really
should. If I use that exact same user in the "physical path credentials"
field and set "clear text" opendir suddenly works. Please don't close
this as it really is a bug and apparently specific to IIS7
Test script:
---------------
<?PHP
error_reporting(E_ALL);
opendir("any UNC path at all"); //example
//someserver/someshare/somefolder
?>
Expected result:
----------------
I expect to get no errors.
Actual result:
--------------
Warning:
opendir(//someserver/someshare/somefolder,//someserver/someshare/somefolder)
[function.opendir]: Access is denied. (code: 5) in
C:\inetpub\wwwroot\testdir.php on line 2
Warning: opendir(//someserver/someshare/somefolder) [function.opendir]:
failed to open dir: No such file or directory in
C:\inetpub\wwwroot\testdir.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52376&edit=1