ID: 22101
Comment by: fnatter at gmx dot net
Reported By: cmouse at quakenet dot org
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Debian linux 2.4.19
PHP Version: 4.3.0
New Comment:
I am having the same problem with php 4.1.2 (Debian 3.0), but with
open_basedir != "/":
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), so
is there another workaround?
thanks,
Previous Comments:
------------------------------------------------------------------------
[2003-02-13 20:43:28] r at phid dot ae
I had the same problem and I was just about to submit a bug because
upgrading from 4.2.3 to 4.3.0 breaks any vhosts that have open_basedir
"/".
Maybe it's an idea to update the documentation to reflect that 'none'
can be used to override a restrictive default?
--
raphidae <[EMAIL PROTECTED]>
------------------------------------------------------------------------
[2003-02-13 13:18:26] d-e-a-t-h at gmx dot net
Hm. It's not only the root-dir (/).
It doesn't work in other directories, either.
e.g. my customer has a www-dir with hundrets of subdirectories. No
Problem in 4.1.2! I had only to 'php_admin_flag open_basedir
"/home/customer/www"'.
Now with PHP 4.3.0 I have to include each subdir and its subdirs which
brings me a lot of work.
Sorry for bad engl.
Greets Stefan
------------------------------------------------------------------------
[2003-02-13 00:51:38] cmouse at quakenet dot org
Sometimes there is... I only use open_basedir / (formerly though, now
it's none) in apache configuration, since phpSysInfo needs to access
few places outside the normal basedir /www. But *shrug* none seems to
work, which it didn't do on the prev. version I had, 4.1.2
------------------------------------------------------------------------
[2003-02-13 00:48:50] [EMAIL PROTECTED]
There's no point in putting / as basedir, like Rasmus said.
------------------------------------------------------------------------
[2003-02-13 00:44:59] cmouse at quakenet dot org
it seems that you can't use '/' as the open_basedir (as you could do in
php 4.1.2). Dunno, maybe it's a good 'sanity' restriction, since the
bug with defining 'none' as open_basedir has been fixed. Well... it
seems that this was perhaps a bug in the user end
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/22101
--
Edit this bug report at http://bugs.php.net/?id=22101&edit=1