Forum Moderators: coopster
web-server - has a local user called webaccess, and I've created a virtual directory, "browse" to: servername\path_to\directory - and allowed "browsing" on it.
file-server - has a local user called webaccess, and webaccess has read permission on the folders in question.
can browse that directory at, for eg.
htp://web-server/browse
However, when I try to open that directory using:
$path="browse";
if (is_dir($full_path)) {
$hndl = opendir($full_path);
I get a bad open.
I tried changing: $path="servername\path_to\directory";
... but get the same error.
Anyone got any idea what I'm doing wrong?
Thansk heaps
Andy
<snip>
$full_path="//remote-server/Shared-folder/Projects";
$hndl = opendir($full_path);
$list = array();
while((@$file=readdir($hndl))!== false) {
if($file!= '.' && $file!= '..') {
$list[] = $file;
}
}
@closedir($hndl);
</snip>
gives me:
Warning: opendir(//remote-server/Shared-folder/Projects): failed to open dir: Invalid argument in ...
any other ideas?
Oh, so happy!
Ok, for anyone else who may get stuck, the problem was with the IIS password management.
Open up IIS manager, and select the folder that contains the php file that is trying to access the UNC path. Right click, select properties. In there, click on the "Directory security" tab, and click on "Edit" for the annonymous. In there, de-select the "allow IIS to manage password", or something like that, and see if that fixes it :)
Thanks