From: e dot vandeoudeweetering at marcanti dot esprit-sg dot nl
Operating system: Windows 2000 SP4 5.00.2195
PHP version: 5.0.1
PHP Bug Type: COM related
Bug description: COM Object EnumNetworkDrives
Description:
------------
To enumerate network drives or printer connections, a COM function
'EnumNetworkDrives()' or
'EnumPrinterConnections()'is used.
When I run my script with 'EnumNetworkDrives()' as an example, an
exception is thrown. This exception is also thrown when using the function
'EnumPrinterConnections()'.
Reproduce code:
---------------
<?php
$network = new COM("WScript.Network");
$nd = $network -> EnumNetworkDrives();
for($i = 0; $nd -> Count(); $i += 2) {
print $nd -> Item($i) . " " . $nd -> Item($i +1) . "\n";
}
?>
Expected result:
----------------
G: \\%SERVER%\%SHARE%
I: \\%SERVER%\%SHARE%
J: \\%SERVER%\%SHARE%
K: \\%SERVER%\%SHARE%
L: \\%SERVER%\%SHARE%
M: \\%SERVER%\%SHARE%
Actual result:
--------------
G: \\%SERVER%\%SHARE%
I: \\%SERVER%\%SHARE%
J: \\%SERVER%\%SHARE%
K: \\%SERVER%\%SHARE%
L: \\%SERVER%\%SHARE%
M: \\%SERVER%\%SHARE%
PHP Fatal error: Uncaught exception 'com_exception' with message 'Source:
Unknown
Description: Unknown' in C:\Scripts\php\drives.php:6
Stack trace:
#0 {main}
thrown in C:\Scripts\php\drives.php on line 6
--
Edit bug report at http://bugs.php.net/?id=30178&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30178&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30178&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30178&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30178&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30178&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30178&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30178&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30178&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30178&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30178&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30178&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30178&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30178&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30178&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30178&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30178&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30178&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30178&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30178&r=mysqlcfg