#27498 [Opn->Bgs]: wrong error message generated by opendir when safe mode is in effect
| From: | nlopess@php.net | Date: | Fri, 05 Mar 2004 18:36:17 +0000 |
| Subject: | #27498 [Opn->Bgs]: wrong error message generated by opendir when safe mode is in effect | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969359386@lists.php.net to get a copy of this message | ||
ID: 27498
Updated by: nlopess@php.net
Reported By: troels at kyberfabrikken dot dk
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: red hat linux
PHP Version: 4.3.4
New Comment:
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
.
Previous Comments:
------------------------------------------------------------------------
[2004-03-04 16:57:19] troels at kyberfabrikken dot dk
Description:
------------
while trying to open a dir that diddent exist, i recieved a wrong
error-message. this caused me to waste a lot of time, before i finally
figured out the real problem.
1. php is running as module under apache in safe mode. version = 4.3.3
2. /home/virtual/site1/fst/var/www/html/ is my www root
3. /home/virtual/site1/fst/var/www/html/data/ is a dir, end it's CHMOD
777
4. /home/virtual/site1/fst/var/www/html/data/subdir is non-existent
i recieve this error message :
Warning in line 3 of file
/home/virtual/site1/fst/var/www/html/index.php
[2] opendir(): SAFE MODE Restriction in effect. The script whose uid is
503 is not allowed to access
/home/virtual/site1/fst/var/www/html/data/subdir owned by uid 0
witch gave my a few hours messing around until i finally discovered
that i just forgot to create the dir in mention.
however - if php had given me a more precise error, i would have saved
a lot of time. when it comes down to it, safemode had nothing to do
with the real problem.
Reproduce code:
---------------
[index.php : begin]
<?php
$dir = "/home/virtual/site1/fst/var/www/html/data/subdir";
$handle = opendir($dir);
?>
[index.php : end]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27498&edit=1