ID: 36673
User updated by: edoardo at serra dot to dot it
Reported By: edoardo at serra dot to dot it
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Linux 2.6 (FC4)
PHP Version: 5.1.2
New Comment:
Using an absolute path give a more useful error message
that make me notice safe mode is on on that VHOST
Sorry for my mistake, but the "file not found" error message, not
indicating a SAFE MODE problem, was confusing for me.
Do you still consider it a bug ?
Output with full path
Warning: include() [function.include]: SAFE MODE Restriction in effect.
The script whose uid is 1000 is not allowed to access .....
Warning: include(/.../theme.php) [function.include]: failed to open
stream: Success in /.../header.php on line 35
Previous Comments:
------------------------------------------------------------------------
[2006-03-09 19:01:23] [EMAIL PROTECTED]
Does it work if you specify absolute path?
------------------------------------------------------------------------
[2006-03-09 18:51:55] edoardo at serra dot to dot it
Description:
------------
I have a web application needing write permissions on a directory.
I decided to recursively chown that directory to nobody (the user the
webserver is running as)
As I chown 'chown -R nobody layout/' I get:
Warning: include(layout/theme.php) [function.include]: failed to open
stream: No such file or directory in /......./html/header.php on line
35
Warning: include() [function.include]: Failed opening
'layout/theme.php' for inclusion (include_path='.:/usr/local/lib/php')
in /......./html/header.php on line 35
line 35 is: include("layout/theme.php");
Needless to say the file is existent
# ll layout/theme.php
-rw-r--r-- 1 nobody web 31413 Mar 9 16:03 layout/theme.php
As I chown the dir back to the owner of header.php it start working
again...
# chown -R web layout/
# ll layout/theme.php
-rw-r--r-- 1 web web 31413 Mar 9 16:03 layout/theme.php
Safe mode is off
Reproduce code:
---------------
Cannot find a few lines of code reproducing the bug, should see the
whole application
Expected result:
----------------
I expect to have the page included without problems
Actual result:
--------------
Warning: include(layout/theme.php) [function.include]: failed to open
stream: No such file or directory in /......./html/header.php on line
35
Warning: include() [function.include]: Failed opening
'layout/theme.php' for inclusion (include_path='.:/usr/local/lib/php')
in /......./html/header.php on line 35
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36673&edit=1