From: jf dot klug at canfer dot com Operating system: Windows 2000 PHP version: 4.3.2 PHP Bug Type: IIS related Bug description: UNC Paths using IIS 5.0 and Win2k
Description: ------------ I'm trying to open a directory that is on a win2k network share. I've read about UNC path problems, and they all claim to have been fixed in 4.0.6 or somthing like that, but i'm using 4.3.2 and it's still not working. This code was ripped straight form the php documentation: <?php $dir = "/tmp/"; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { print "filename: $file : filetype: " . filetype($dir . $file) . "<br>"; } closedir($dh); } } ?> Now when I make $dir equal to "//shareddrive/" or "\\\\shareddrive\\" nothing happens, no error or anything. Same thing happens if I map the drive to a letter, like "z:", it still does nothing. It doesn't list the directory, nor does it give an error. The server has full rights to connect with the shared folder, so it's not a permissions thing. It also doesn't work when I use the UNC path for the webserver that this script is running on, but it does work when I just list "./" so I think it's just a problem with UNC paths. The server is running IIS 5.0 and php 4.3.2. Yes there are other UNC path bug reports, but they've all been dissmissed and stated that it's fixed in 4.0.6, but I'm using a way later version then that and it's not fixed, so what gives? Reproduce code: --------------- <?php $dir = "//fileserv/"; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { print "filename: $file : filetype: " . filetype($dir . $file) . "<br>"; } closedir($dh); } } ?> Expected result: ---------------- Should list all files and folders in that directory. Actual result: -------------- A blank page. No error or nothing. -- Edit bug report at http://bugs.php.net/?id=24795&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24795&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24795&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24795&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24795&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24795&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24795&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24795&r=support Expected behavior: http://bugs.php.net/fix.php?id=24795&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24795&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24795&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24795&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24795&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24795&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24795&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24795&r=gnused