php.net |  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: jalal@php.net Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.0 Latest CVS (19/10/2000) OS: WinNT4sp6
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: jalal@php.net
New email:
PHP Version: OS:

 

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

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

returns:
$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;

Patches

Pull Requests

History

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

- James
 [2001-04-29 14:00 UTC] andi@php.net
Fixed in latest CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 09:01:28 2025 UTC