I am having trouble getting a script to write to an attached network drive/NAS. The strange thing is, the same webserver has no problems reading/writing to the same directory from an existing script on the server. I am not strong with Windows/IIS webserver so I will try to list as many things as I can.
First of all, I am using a simple test script to perform an is_dir and also is_writeable. I use the same $dir variable as the one from the working script.
Here is an example:
$aftn_path = "\\\\skynas01\\shared_files\\";
if(is_dir($aftn_path)) echo "$aftn_path is a directory."; else echo "$aftn_path is not a directory";
What's returned is:
\\skynas01\shared_files\ is not a directory
I can copy/paste the directory string into a run command and the directory opens fine. I checked permissions on that directory and shows "everyone" can read/write/execute from that Dir. Again, another script with the exact same directory string with an fopen() call works with no problems and I can write files there.
The only other thing I can think of could be that the IIS server uses helicon ISAPI Rewrite module and the script which works does have a rule pointing to that PHP file (which I don't understand either)
Here is the ISAPI rewrite rule
RewriteRule /sys/filing(.*) /phpsys/filing.php [I,L]
To me, it looks like it's just aliasing /sys -> /phpsys.
The \skynas01 network mount is mapped to an internal drive on the server, and is not accessible by the drive letter either (G:/shared_files). I've also tried using forward slashes (//skynas01/shared_files). Does anyone have any ideas why my script can't see this directory?