php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5296 readdir function error
Submitted: 2000-07-01 00:34 UTC Modified: 2000-07-01 08:32 UTC
From: eunjea at kldp dot org Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: eunjea at kldp dot org
New email:
PHP Version: OS:

 

 [2000-07-01 00:34 UTC] eunjea at kldp dot org
<?php 
  $handle=opendir('.'); 
  while ($file = readdir($handle)) { 
     if ($file != "." && $file != "..") { 
          echo "$file\n"; 
      } 
  }
 closedir($handle); 
?>

This script the same one from php manual.
in php 4.0 It's was ok.
but in php 4.0.1, sometimes show following messages.

1 is not a valid Directory resource in /home/silver/public_html/readdir.php3 on line 5

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-01 08:32 UTC] andi at cvs dot php dot net
Zeev has fixed this in the latest CVS. Please try it and if you're still having problems open a new bug report.
Thanks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Sep 23 08:00:02 2025 UTC