From: fantasysportswire at yahoo dot com Operating system: WINXP SP 2 PHP version: 5.2.1 PHP Bug Type: *Directory/Filesystem functions Bug description: Virtual drives return "failed to open dir: Bad file descriptor"
Description: ------------ If I use scandir on a virtual drive it returns: Warning: scandir(w:): failed to open dir: Bad file descriptor I have also tried w:\ and w:/ to the same result. However... scandir("w:\\folder") works just fine. realpath does almost the same thing... if from w: I run a script with: <? echo realpath("."); ?> and run it like php -n script.php ... I get nothing If I go into "folder" and run it php -n w:\script.php I returns w:\folder Just to repeat - this only seems to happen in a Virtual (subst) root path. Inside folders in the virtual path work fine. Both incidents happen using the -n flag, so there is no possible setting issue. Reproduce code: --------------- <? echo realpath(".")."\n"; print_r(scandir(".")); ?> Expected result: ---------------- Current Path and an array dump of the files. Actual result: -------------- Nothing for realpath and "Warning: scandir(w:): failed to open dir: Bad file descriptor" for scandir -- Edit bug report at http://bugs.php.net/?id=41155&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41155&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41155&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41155&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41155&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41155&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41155&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41155&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41155&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41155&r=support Expected behavior: http://bugs.php.net/fix.php?id=41155&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41155&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41155&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41155&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41155&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41155&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41155&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41155&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41155&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41155&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41155&r=mysqlcfg