How do I configure IIS to allow access to network resources for PHP scripts?
As you guessed this is a permissions problem... the user that the IIS worker process is running as is a local account on the machine (most likely IUSER_<MACHINENAME>
), and that user isn't authenticated (nor does the acocunt even exist!) on the other machines you're trying to browse via UNC
Just as a test, you can go into IIS manager and change what the IIS service is running as for that website... I'm using terminology from Server 2003/IIS 6 though because I don't have a Server 2008 box handy right now. If you poke around in the IIS 7 manager you should be able to find where you can set the user that the worker process runs as.
Your PHP application runs using a service account, and this is the user account whose credentials are used to access the network resources. The default for IIS is to use a local account of the web server for this, and that account doesn't have permissions to access network resources (because it's a local account).
You should configure the IIS application pool for your web site to run using a domain user account, and then give that user account the appropriate permissions on the network share.
If you don't have an Active Directory domain, or those two servers aren't member of it, things get a little more tricky, but it can be done anyway by creating two user accounts with the same usernames and passwords on both servers.