ID: 50567
Updated by: [email protected]
Reported By: svecpetr at svecpetr dot com
-Status: Open
+Status: Feedback
Bug Type: Safe Mode/open_basedir
Operating System: freebsd
PHP Version: 5.2SVN-2009-12-24 (snap)
New Comment:
What is the exact error you get with exactly what line of code? And
what is open_basedir set to? (EXACTLY..)
Previous Comments:
------------------------------------------------------------------------
[2009-12-24 09:36:30] svecpetr at svecpetr dot com
Description:
------------
read how reproduce this bug FIRST!!!
try execute file_exists($_SERVER['SCRIPT_FILENAME']);
$_SERVER['SCRIPT_FILENAME'] is '/DISK2/WWW/xxx.cz/www/index.php'
it fails with error:
Warning: file_exists(): open_basedir restriction in effect.
File(underconstruction.html) is not within the allowed path(s):
(/DISK2/WWW:/DISK3/WWW:/DISK2/TMP:/NET:/tmp) in
/DISK2/WWW/xxx.cz/www/index.php on line 7
Reproduce code:
---------------
---
>From manual page: function.file-exists#Description
---
safe-mode ON
execute script by CRON, means $_SERVER['REMOTE_ADDR'] is empty
get of getcwd() returns '/'
Expected result:
----------------
why should I change
chdir('/DISK2/WWW/xxx.cz/www/')
before use of function
file_exists($_SERVER['SCRIPT_FILENAME']);
or
file_exists('/DISK2/WWW/xxx.cz/www/index.php')
when I ask this function for file that is IN ALLOWED PATH
Actual result:
--------------
correct file_exists function
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50567&edit=1