Re: php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux