php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 - 18 = ?
Subscribe to this entry?

 
 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

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] derick@php.net
What is the full error message?

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

result:

Warning: Unable to access "nonexisten directory....." in "whatever.php" on line "xx"
 [2002-11-18 16:03 UTC] derick@php.net
Okay, it looks like this is fixed in CVS. Can you try the windows snapshot @ http://snaps.php.net/~edink/php-4.3.0RC1-Win32.zip ?

Derick
 [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() [http://www.php.net/function.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] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 [2002-12-01 18:00 UTC] philip@php.net
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] sniper@php.net
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] sniper@php.net
forgot to update the version and OS..

 [2003-01-15 20:47 UTC] iliaa@php.net
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 http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

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


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 04:01:38 2024 UTC