#19292 [Com]: random error: open_basedir restriction in effect. File is in wrong directory
| From: | Xuefer at 21cn dot com | Date: | Wed, 01 Jan 2003 16:11:50 +0000 |
| Subject: | #19292 [Com]: random error: open_basedir restriction in effect. File is in wrong directory | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-28876@lists.php.net to get a copy of this message | ||
ID: 19292
Comment by: Xuefer@21cn.com
Reported By: tnowak@triger.com.pl
Status: Critical
Bug Type: Apache related
Operating System: linux
PHP Version: 4.3.0-dev,4.2.3
New Comment:
i have the same problem after i upgrade from 4.2.2 to 4.3.0(release
version)
pls update bug version No.
it's _NOT_ fixed in php-4.3.0
it seems php may not re-initize correctly
cause there's an un-relative bug: http://bugs.php.net/?id=21306
but i'm just guessing
Previous Comments:
------------------------------------------------------------------------
[2002-11-12 16:06:18] phpbugs@c9x.org
Same problem here on FreeBSD 4.7-STABLE + Apache and it's
really a showstoppper.
PHP is today's 4.3.0-dev snapshot, but a 4.2.3 release had
the same behavior.
Sometimes the error message reports the open_basedir of
another unrelated virtualhost.
The problem _never_ showed up on OpenBSD 3.1/3.2 + Zeus +
PHP 4.2.3 with FastCGI on a very similar setup.
There's definitely an off-by-one or some kind of memory
corruption somewhere.
------------------------------------------------------------------------
[2002-11-11 08:43:36] robert.prokes@ignum.cz
We randomly gets this error even if virtual server has this option
switched off. (but other virtual servers has this option on)
------------------------------------------------------------------------
[2002-11-10 05:01:42] static@wicked.dj
I get this problem alot on my site http://perthtunes.wicked.dj/ which
is not hosted by me..
Apache Version 1.3.27 (Unix)
Kernel Version 2.4.18-0.12
Perl Version 5.006001
PHP Version 4.2.3
the site has alot of nested include files and I seem to get a high rate
of recreation of the error. seems to happen 1 in every 5 or so page
views for most users.
------------------------------------------------------------------------
[2002-10-31 04:17:18] mbr@freebsd.org
Can you mark this critical ?
------------------------------------------------------------------------
[2002-10-30 00:56:28] david@ols.es
I also have this problem, in both Solaris 8 and Linux Mandrake with
Apache 1.2.27 with PHP 4.2.2, 4.2.3 and
also 4.3.0r2. In all cases the followig example does not work and php
complains about open_basedir restriction in
all but in 4.3.0r2, where the example does not work and no
warning or error message is issued.
You can reproduce this situation with 3 php scripts with safe_mode on:
/usr/local/http-docs/common/scripts/test.php --------------
<?php
include("test/test.php");
?>
/usr/local/http-docs/common/lib/test/test.php -------------
<?php
phpinfo();
echo "hello";
include("hello.php");
?>
/usr/local/http-docs/common/lib/test/hello.php -------------
<?php
echo "hello world";
?>
Apache configuration to reproduce the situation --------------
<Directory "/usr/local/http-docs/common/lib/">
Options none
AllowOverride None
Order allow,deny
Deny from all
</Directory>
Alias /scripts/ "/usr/local/http-docs/common/scripts/"
<Directory "/usr/local/http-docs/common/scripts/">
Options none
AllowOverride None
Order allow,deny
Allow from all
php_admin_value open_basedir
/usr/local/http-docs/common/scripts/:/usr/local/http-docs/common/lib
</Directory>
<VirtualHost 192.168.0.3>
ServerName 192.168.0.3
DocumentRoot /usr/local/http-docs/test
php_admin_value open_basedir
/usr/local/http-docs/test:/usr/local/http-docs/common/lib:/var/tmp:/usr/local/lib/php
php_admin_value doc_root /usr/local/http-docs/test
</VirtualHost>
to reproduce the error just go to http://192.168.0.3/scripts/test.php
altough phpinfo() on /usr/local/http-docs/common/lib/test/test.php
shows that open_basedir includes /usr/local/http-docs/common/lib
php fails to open hello.php
------------------------------------------------------------------------
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/19292
--
Edit this bug report at http://bugs.php.net/?id=19292&edit=1