From: gianfranco dot pavesi at ergoitalia dot it
Operating system: Windows Server 2003 std sp1
PHP version: 5.2.0
PHP Bug Type: IIS related
Bug description: Unable to list (scandir) a shared directory
Description:
------------
I've tried to read the content of a shared remo directory from a web
application running under IIS 6.0
It doesn't work !
If I run the same PHP code from a command line on the same server where
the IIS is running, using the command "c:\php\php.exe my_php_code.php" ...
it works !!!
Reproduce code:
---------------
<?php
...
$mypath = "\\\\ergmilftp01\Sinistri_Scanner\Prod" ;
$mylist = scandir("\\\\ergmilftp01\Sinistri_Scanner\Prod") ;
foreach ($mylist as $myfile) {
echo $myfile."<br />" ;
}
...
?>
Expected result:
----------------
pippo.txt
pluto.txt
paperino.txt
Actual result:
--------------
Warning: scandir(\\ergmilftp01\Sinistri_Scanner\Prod) [function.scandir]:
failed to open dir: Invalid argument in D:\TechPortalTest\gsc_prova.php on
line 8
Warning: scandir() [function.scandir]: (errno 22): Invalid argument in
D:\TechPortalTest\gsc_prova.php on line 8
Warning: Invalid argument supplied for foreach() in
D:\TechPortalTest\gsc_prova.php on line 10
--
Edit bug report at http://bugs.php.net/?id=39436&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=39436&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=39436&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=39436&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39436&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=39436&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39436&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39436&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39436&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39436&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39436&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=39436&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=39436&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39436&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39436&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39436&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39436&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39436&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39436&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39436&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39436&r=mysqlcfg