|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7344 opendir always returns a resource even on non-existen directories
Submitted: 2000-10-19 11:32 UTC Modified: 2001-04-29 14:00 UTC
From: Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.0 Latest CVS (19/10/2000) OS: WinNT4sp6
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:
New email:
PHP Version: OS:


 [2000-10-19 11:32 UTC]
See subject line...
Try code:

$dir = "/somewhere/on/my/drive";
$res = opendir( $dir );
echo "\$dir=$dir, \$res = $res\n";

$dir=/somewhere/on/my/drive, $res = Resource ID #1

(/somewhere/on/my/drive is not a real directory.

On linux, the same code returns a false;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-12 15:50 UTC]
a me-too...
the same on NT 5, mod_php4 from php4-200101120245
 [2001-04-29 13:15 UTC]
Please try the latest CVS and open a new bug report if this is still the case.
 [2001-04-29 13:38 UTC]
this still is the case with yesterdays CVS.

- James
 [2001-04-29 14:00 UTC]
Fixed in latest CVS.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Aug 06 03:01:24 2021 UTC