ID: 20190
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Apache related
Operating System: FreeBSD
PHP Version: 4.2.3
New Comment:
If I allow the open_basedir restriction to pass,
I get now random segfaults :
Program terminated with signal 11, Segmentation fault.
#0 0x2835d21e in _object_and_properties_init (arg=0xbfbffccc,
class_type=0x0, properties=0xbfbffce2) at zend_API.c:584
584
ALLOC_HASHTABLE_REL(arg->value.obj.properties);
(gdb) bt
#0 0x2835d21e in _object_and_properties_init (arg=0xbfbffccc,
class_type=0x0, properties=0xbfbffce2) at zend_API.c:584
(gdb) list
579 }
580
581 if (properties) {
582 arg->value.obj.properties = properties;
583 } else {
584
ALLOC_HASHTABLE_REL(arg->value.obj.properties);
585 zend_hash_init(arg->value.obj.properties, 0,
NULL, ZVAL_PTR_DTOR, 0);
586 zend_hash_copy(arg->value.obj.properties,
&class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void
*) &tmp, sizeof(zval *));
587 }
588 arg->type = IS_OBJECT;
(gdb) p arg->value.obj.properties
$1 = (HashTable *) 0x636f6c2f
(gdb) p *arg->value.obj.properties
Cannot access memory at address 0x636f6c2f.
(gdb) p properties
$2 = (HashTable *) 0xbfbffce2
(gdb) p *properties
$3 = {nTableSize = 1212367181, nTableMask = 1162893652, nNumOfElements
= 942893373, nNextFreeElement = 1714236726,
pInternalPointer = 0x62656572, pListHead = 0x2e346473, pListTail =
0x53550033, arBuckets = 0x743d5245, pDestructor = 0x726f6f,
persistent = 77 'M', nApplyCount = 65 'A', bApplyProtection = 73
'I'}
(gdb) p *arg
$4 = {value = {lval = 1920169263, dval = 9.4870166287391071e+170, str =
{val = 0x7273752f <Address 0x7273752f out of bounds>,
len = 1668246575}, ht = 0x7273752f, obj = {ce = 0x7273752f,
properties = 0x636f6c2f}}, type = 97 'a', is_ref = 108 'l',
refcount = 29487}
Previous Comments:
------------------------------------------------------------------------
[2002-10-31 10:03:59] [EMAIL PROTECTED]
I already use this snapshot. And it still happens.
I'll post soon more info. I'm compiling now a debug version.
Martin
------------------------------------------------------------------------
[2002-10-31 09:23:36] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[2002-10-31 09:01:33] [EMAIL PROTECTED]
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.
------------------------------------------------------------------------
[2002-10-31 08:55:47] [EMAIL PROTECTED]
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