#20190 [Com]: Random mem corruption: zend_get_executed_filename() mismatch
| From: | mbr at freebsd dot org | Date: | Thu, 31 Oct 2002 15:01:33 +0000 |
| Subject: | #20190 [Com]: Random mem corruption: zend_get_executed_filename() mismatch | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-23793@lists.php.net to get a copy of this message | ||
ID: 20190
Comment by: mbr@freebsd.org
Reported By: mbr@freebsd.org
Status: Open
Bug Type: Apache related
Operating System: FreeBSD
PHP Version: 4.2.3
New Comment:
Note that this bug is similar to a other bug,
http://bugs.php.net/bug.php?id=19292
It's not the same bug. There were some checks wrong
in fopen_wrappers.c. This is fixed in cvs.
This bug does show similar results as 19292,
but the source of the problem is completly different.
This a webserver with ~400 virtual servers, ~100
have php enabled.
I see the bug happen if I access frequently
pages of customer 1 (php enabled) and at the same time
customer 2.
Previous Comments:
------------------------------------------------------------------------
[2002-10-31 08:55:47] mbr@freebsd.org
I've done this change in main/fopen_wrappers.c to see what
happens:
- php_error(E_WARNING, "open_basedir restriction
- in effect. File is in wrong directory");
+ php_error(E_WARNING, "open_basedir: File should
+ be in %s, but is in %s file (%s)",
+ pathbuf, path,
+ zend_get_executed_filename(TSRMLS_C));
let's say pathbuf=$a, path=$b,
zend_get_executed_filename=$c
As you see $a (which is PG(open_basedir)), should be
identical to the path without added filename of both
$b and $c.
The error is random. Sometimes $a and $c are correct,
and $b is plain wrong (from a previous request). Sometimes
$a and $c are correct, and $b is wrong.
[24-Oct-2002 10:49:19] PHP Warning: open_basedir: File should be in
/www/doc/www.aaa.ch-80, but is in /www/doc/
www.bbb.ch-80/html/visions/php/include/globals.inc in
/www/doc/www.aaa.ch-80/index.php on line 2
[24-Oct-2002 10:49:19] PHP Warning: open_basedir: File should be in
/www/doc/www.aaa.ch-80, but is in /www/doc/
www.bbb.ch-80/html/visions/php//wrapper.php in
/www/doc/www.aaa.ch-80/index.php on line 6
[24-Oct-2002 10:53:45] PHP Warning: open_basedir: File should be in
/www/doc/www.aaa.ch-80, but is in /www/doc/
www.bbb.ch-80/html/visions/php//include/globals.inc in
/www/doc/www.aaa.ch-80/index.php on line 2
[24-Oct-2002 10:53:45] PHP Warning: open_basedir: File should be in
/www/doc/www.aaa.ch-80, but is in /www/doc/
www.bbb.ch-80/html/visions/php//wrapper.php in
/www/doc/www.aaa.ch-80/index.php on line 6
This bug is critical and not fixed in cvs. I just tried
the newest snapshot and it's not fixed.
Martin
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20190&edit=1