How do I configure IIS to allow access to network resources for PHP scripts?

Posted by Dereleased on Server Fault See other posts from Server Fault or by Dereleased
Published on 2010-08-05T00:27:15Z Indexed on 2010/12/24 2:55 UTC
Read the original article Hit count: 219

Filed under:
|
|
|
|

I am currently working on a PHP front-end that joins together a series of applications running on separate servers; many of these applications generate files that I need access to, but these files (for various reasons) reside on their parent servers.

If I, from the command line, issue a bit of script such as:

<?php
var_dump(glob("\\\\machine-name\\some\\share\\*"));

I will get the full contents of that directory, proving that there's no problem programmatically with PHP reading the contents of a UNC share. However, if I try to execute the same script from the web server, I get an empty array -- more specifically, if I use more explicitly functions designed to "open" a directory like it was a file, I get access errors.

I believe this to be a permissions issue, but I am not a server/network administrator type, so I'm not sure what I need to do to correct this and get my script running, and the links I've checked out have not been a terrible amount of help, perhaps due to my background, or lack thereof as far as IIS is concerned, coupled with the fact that we are not actually using .NET for this.

Relevant Stats: Windows Server 2008 Standard SP2 IIS 7.0 PHP 5.2.9

I will be connecting to two types of servers: a few other nearly-identical Server 2008 machines, and a machine running embedded XP.

Links that have not been particularly helpful but maybe I am just misreading:

© Server Fault or respective owner

Related posts about networking

Related posts about php