|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20488 is_dir(), Warning: Unable ...
Submitted: 2002-11-18 15:42 UTC Modified: 2003-01-15 20:47 UTC
From: half-dead at nospam dot net Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.3.0-dev, 4.4.0-dev OS: *
Private report: No CVE-ID: None
 [2002-11-18 15:42 UTC] half-dead at nospam dot net
is_dir() throws a Warning: Unable to access ....

But only when safe mode is turned on, instead of just returning false.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-18 15:46 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-11-18 15:49 UTC] half-dead at nospam dot net
If the dir doesn't exist it throws this warning ..but only in safe mode, instead of simply returning false.
 [2002-11-18 15:53 UTC]
What is the full error message?

 [2002-11-18 15:56 UTC] half-dead at nospam dot net
is_dir("nonexisten directory.....");


Warning: Unable to access "nonexisten directory....." in "whatever.php" on line "xx"
 [2002-11-18 16:03 UTC]
Okay, it looks like this is fixed in CVS. Can you try the windows snapshot @ ?

 [2002-11-18 16:52 UTC] half-dead at nospam dot net
Nope not in safe mode at least, now i simply get a ref to the php doc page with the warning (4.3RC1):

is_dir("non existing directory...");

Warning: is_dir() []: Unable to access "non existing directory..." in "whatever.php" on line "xx"

Again, this only happens if safe mode is turned ON
 [2002-12-01 16:35 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

 [2002-12-01 18:00 UTC]
I don't get it.  Someone reports a bug, it's tested in latest PHP version as asked, problem still exists ... and now it's marked as bogus?

Why doesn't this simply return boolean false?  Where is this behavior documented?  Reopening...
 [2002-12-01 19:51 UTC]
My mistake, I misread the whole issue here..and forgot that is_dir() is not supposed to output any errors. :)

Anyway, the problem is in php_checkuid() which outputs
the error. I guess we need to put some extra parameter for it to not output errors..

 [2002-12-01 19:52 UTC]
forgot to update the version and OS..

 [2003-01-15 20:47 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 23 20:01:23 2021 UTC