ID:               28791
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tril2632 at hotmail dot com
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Directory function related
 Operating System: WIN 2000 PRO SERVER
 PHP Version:      4.3.7
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2004-07-08 13:04:36] [EMAIL PROTECTED]

Is the drive D some network share?


------------------------------------------------------------------------

[2004-06-15 16:00:48] tril2632 at hotmail dot com

Description:
------------
Hello

The problem is that the script when he scan a sub directory in the
drive cald "D", he failed with the error 
"Warning: opendir(d:/Alcatel_save): failed to open dir: Invalid
argument in C:\Inetpub\wwwroot\lister.php on line 8
".

This problem only occure when the script try to open with the "opendir"
function a subdirectory in the drive "D" but with drive C: it works
perfectly.

The script has no problem to open dir in the drive d: but this error
only occure when he try to open a SUBDIRECTORY !!!

The permission are the same than the other directory in c: and d:
driver.

Reproduce code:
---------------
<?php

$tab_deja_vu = array(); 
recurse_dir('d:', $tab_deja_vu);

function recurse_dir($rep, $tab_deja_vu)
{
$open = opendir($rep);

  while($sous_rep = readdir($open))
  {
    if(is_dir($rep . '/' . $sous_rep) && $sous_rep != '.' && $sous_rep
!= '..')
    {
        if(!array_key_exists($rep . '/' . $sous_rep, $tab_deja_vu))
        {
          echo '<option
value="'.$rep.'/'.$sous_rep.'">'.$rep.'/'.$sous_rep.'';
                                                        $tab_deja_vu[] = $rep . '/' . 
$sous_rep;
                                                        recurse_dir($rep . '/' . 
$sous_rep, $tab_deja_vu);
        }
     }
  }
 closedir($open);
}
?>

Expected result:
----------------
The script should save in the array "$tab_deja_vu" the entire directory
and sub directory etc of a given directory in parameter.

Actual result:
--------------
d:/Alcatel_save
Warning: opendir(d:/Alcatel_save): failed to open dir: Invalid argument
in C:\Inetpub\wwwroot\lister.php on line 8

Warning: readdir(): supplied argument is not a valid Directory resource
in C:\Inetpub\wwwroot\lister.php on line 10

Warning: closedir(): supplied argument is not a valid Directory
resource in C:\Inetpub\wwwroot\lister.php on line 22
d:/Cerpass_save
Warning: opendir(d:/Cerpass_save): failed to open dir: Invalid argument
in C:\Inetpub\wwwroot\lister.php on line 8

Warning: readdir(): supplied argument is not a valid Directory resource
in C:\Inetpub\wwwroot\lister.php on line 10

Warning: closedir(): supplied argument is not a valid Directory
resource in C:\Inetpub\wwwroot\lister.php on line 22
d:/Copilote_save


etc ... the error "supplied argument is not a valid Directory resource
in C:\Inetpub\wwwroot\lister.php on " appears every time the opendir
function try to open a sub directory on drive d:


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28791&edit=1

Reply via email to