|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10219 the dir object created using dir() does not contain the last file in the dir
Submitted: 2001-04-06 21:11 UTC Modified: 2001-04-09 19:59 UTC
From: gopinath at kasenna dot com Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.0.4pl1 OS: Redhat Linux 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gopinath at kasenna dot com
New email:
PHP Version: OS:


 [2001-04-06 21:11 UTC] gopinath at kasenna dot com
$d = dir("/etc");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while($entry=$d->read()) {
    echo $entry."<br>\n";

It lists all but the last file in the directory.

same result when I tried with opendir() and readdir() combination.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-06 21:23 UTC]
Can't reproduce with CVS version, try it first and if this still continues reopen the report.

 [2001-04-09 19:18 UTC] gopinath at kasenna dot com
Here is the scenario that I have.
I have an nfs mounted a filesystem on SGI Irix machne on to
an redhat 7.1 machine. The error happens within this
file system.

I tried in different directories and got the same result 
and thought it to be a generic problem. It is not.
It works just fine on the local file systems. I have
tried on other remote mounted filesystems that are
mounted from other linux machines and see no problems
there either.
(a diff between nfs2 and nfs3 possibly?)

 [2001-04-09 19:59 UTC]
With a quick search on Google I found this:

Which seems to suggest this is a bug in glibc.


PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Aug 06 04:01:23 2021 UTC