#39436 [Opn->Bgs]: Unable to list (scandir) a shared directory

From: Date: Wed, 08 Nov 2006 17:46:28 +0000
Subject: #39436 [Opn->Bgs]: Unable to list (scandir) a shared directory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-104641@lists.php.net to get a copy of this message
ID: 39436 Updated by: tony2001@php.net Reported By: gianfranco dot pavesi at ergoitalia dot it -Status: Open +Status: Bogus Bug Type: IIS related Operating System: Windows Server 2003 std sp1 PHP Version: 5.2.0 New Comment: Running the code under IIS you're restricted to IIS default user privileges, while running in console you use your own user. Not PHP problem. Previous Comments: ------------------------------------------------------------------------ [2006-11-08 17:36:55] gianfranco dot pavesi at ergoitalia dot it 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 this bug report at http://bugs.php.net/?id=39436&edit=1

« previous php.bugs (#104641) next »