Classes and arrays crash apache?
| From: | Stewart Morgan | Date: | Wed, 02 Feb 2000 01:55:59 +0000 |
| Subject: | Classes and arrays crash apache? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9648@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello all,
First some background info:
Platform: FreeBSD 3.2-STABLE on a lowly i486
Webserver: Apache 1.3.11 with mod_ssl 2.5.0
PHP: B4 CVS as of 31/01/00
Now the interesting bit, the problem. I can
quite easily get Apache to crash (segfault) with the
following code:
- ---------test.php--------------
<?php
class foo {
var $bar = array();
function foo() {
$this->bar[1] = "1";
}
}
$thing = new foo();
print "thing = ". $thing->bar[1] . "<BR>";
?>
- -------------------------------
But the following works fine:
- ---------test2.php--------------
<?
$foo = array();
$foo[1] = "1";
print "foo= ". $foo[1] . "<BR>";
?>
I've not noticed any changes go through the CVS
regarding this though I apologise in advance if I missed it.
I would have loved to have included a gdb trace, but it
takes ages to do any recompiling on a 486 ;)
Any help apreciated!
Stewart.
Stewart Morgan MEng AMIEE
- -------------------------
Director / Systems Administrator,
Nameless Multimedia Ltd.
http://www.nameless-multimedia.com/
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.1i for non-commercial use <http://www.pgpi.com/>
iQA/AwUBOJeOrTBV3dfs1c5kEQI3fQCgvziWlZTwDl6+i9QqJPf2tV0vMgoAoKw+
QBdOGS63JtNcKIjNHtRsBeVF
=fHsC
-----END PGP SIGNATURE-----