hi,
I read the section about open_basedir in the safe_mode
documentation (http://de3.php.net/features.safe-mode)
but this only confirmed my understanding of open_basedir
and didn't help understand the problem below. I tried
to search the net, but couldn't find anything yet.
here is my test-case
(with php_admin_value open_basedir /home/m2004001):
/home/m2004001/Test/test1.php:
<?php
echo "test1";
include("tmp/test2.php");
?>
/home/m2004001/Test/tmp/test2.php:
<?php
echo "test2";
include("test3.php");
?>
/home/m2004001/Test/tmp/test3.php:
<?php
echo "test3";
?>
now load test1.php in the browser and you get:
Warning: open_basedir restriction in effect. File is in wrong
directory in /home/m2004001/Test/tmp/test2.php on line 3
In my project I have all my include files in app/include, and when I
include another include-file in an include-file I omit the path (as in
the example above).
It works when I use absolute paths in include, but I don't want to
specify a path involving the DocumentRoot (in case it gets moved),
and a path like "include('/app/include/test.php')" doesn't work.
thanks,
--
Felix Natter