After a few weeks trying to access content in virtual folder my question:
I have two webservers for load balancing. I have a storage-server for uploaded files. I created a domain-user for the storage with the right privileges. In my PHP-webapp in IIS6 I created a virtual directory pointing to the storage by a UNC-path with 'Connect as' the privileged user. The virtual directory is named 'upload2'.
From my php-script i'am trying to acces the upload2-folder (for reading/writing) with scandir or tried to write a file with fopen. In IIS i can browse/view the contents op the virtual folder. But php says
'Warning: scandir(upload2,upload2) [function.scandir]: The system cannot find the file specified. (code: 2) in E:\inetpub\wwwroot\pvmonitor\test2.php on line 25 Warning: scandir(upload2) [function.scandir]: failed to open dir: No such file or directory in E:\inetpub\wwwroot\pvmonitor\test2.php on line 25
by executing the script:
$filename='upload2';
$dir = $filename;
$files1 = scandir($dir);
print_r($files1);
how do i point php to this virtual folder?
scandir('upload2');
may only work only for a subfolder named 'upload2' for your case, tryscandir('\\storageServerName\upload2')
provided that 'upload2' is the name of the share and permissions are ok – Luis Siquot