Re: php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

From: Date: Fri, 21 Oct 2005 13:15:16 +0000
Subject: Re: php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-224399@lists.php.net to get a copy of this message
Hi, thanks! that was it! when destruct method is removed, all problems are gone. I really don't know why I added the __destruct method to this mysql wrapper. Maybe I saw it somewhere in discussion at php manual bottom.... This code segfaults my apache: <?php class test extends mysqli { public function __construct() { parent::__construct("localhost", "root", "", "mysql"); } public function __destruct() { $this->close(); } } $obj = new test(); ?> Accessing this page means immeadiate apacha segfault and actual connection close. Anybody please test this on 5.0.5 and verify if it's reproducible. Petr
I think this could be related to your _destruct method Can't you just rely on the parent class destruct method? Sorry to be a bit vague, I'll look into it a little further.


« previous php.general (#224399) next »