ID: 24795 Updated by: [EMAIL PROTECTED] Reported By: jf dot klug at canfer dot com -Status: Feedback +Status: Bogus Bug Type: IIS related Operating System: Windows 2000 PHP Version: 4.3.2 New Comment:
.. Previous Comments: ------------------------------------------------------------------------ [2003-07-26 18:14:14] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. You need to use something like this: $dir = "\\\\drive\\dir"; ------------------------------------------------------------------------ [2003-07-26 11:27:45] jf dot klug at canfer dot com I've done //servername/sharedfolder and it doesn't work either. I'm puzzled as to why it's not giving me any error at all. I checked the php settings for error reporting, and they were set to show all errors, so what gives? ------------------------------------------------------------------------ [2003-07-24 11:44:37] [EMAIL PROTECTED] You cannot do "dir \\servername" from the command prompt; you have to use "dir \\servername\sharename". The same restrictions apply to PHP. ------------------------------------------------------------------------ [2003-07-24 11:19:13] jf dot klug at canfer dot com 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 this bug report at http://bugs.php.net/?id=24795&edit=1