In addition to notes above about IIS & PHP reading network shares, here's one solution that works better for me.
in the management console I created a folder where my "read_dir" script runs. click on properties then select the security tab. here you can set the anonymous account to the standard IUSR_$computername% , BUT.. in this case I chose another account that I set up for reading my shares. (make sure login name and password match the credantials you set on the remote machin ;-))
I use this to read a dir and it's contents into a searchable database. and it works like a charm...
Matt Grimm
06-Jun-2003 10:25
Thought I could help clarify something with accessing network shares on a Windows network (2000 in this case), running PHP 4.3.2 under Apache 2.0.44.
However you are logged into the Windows box, your Apache service must be running under an account which has access to the share. The easiest (and probably least safe) way for me was to change the user for the Apache service to the computer administrator (do this in the service properties, under the "Log On" tab). After restarting Apache, I could access mapped drives by their assigned drive letter ("z:\\") or regular shares by their UNC path ("\\\\shareDrive\\shareDir").
mitka at actdev.com
28-Sep-2002 01:42
Re: Accessing network directories on W32
In reply to the previous comments, to enable opendir() to open directories like "\\SOMEHOST\shareddir", with PHP+IIS:
Follow the instructions here: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q189408
Check that the file share allows reads to IUSR_[HOSTNAME] user.
kcgt at go dot com
30-Aug-2002 04:14
I don't know if this will work the same, but I was working with copy() in order to copy a file to a network drive using IIS.
In order to be able to copy to a network drive, you have to have permissions for the user IUSR_computername where computername is the name of the computer that is running PHP. Once permissions were set up on the remote machine, PHP was able to access the remote files. I don't know if this will work the same with opendir, but it might be worth a try......
Partager