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,

I've just installed php 5.0.5 to newest ubuntu breezy and apache2
started (sometimes) segfaulting (teste two computers with ubuntu hoary
and ubuntu breezy - same results).

Is says something like this:

[Thu Oct 20 12:32:21 2005] [notice] child pid 13161 exit signal
Segmentation fault (11)
[Thu Oct 20 12:32:21 2005] [notice] child pid 13191 exit signal
Segmentation fault (11)

Apache2 is breezy version Server version: Apache/2.0.54
Server built:   Oct  4 2005 07:42:46

It does this only in some applications (for example phpMyAdmin works ok)
 but PHP 5.0.4 worked ok. I tried to isolate some code which do the
segfaults but withou big success.

This code could be involved.. I don't know. It works sometimes,
sometimes not.

------------------------------------
this line maybe?: parent::__construct($config['host'],
$config['username'], $config['password'], $config['db']);
------------------------------------

class MySQL extends mysqli {
	static function &getInstance($configuration) {
	    static $dbObj = null;
	
	    if (is_null($dbObj)) {
	        $dbObj = new Mysql($configuration);
	    }
	    return $dbObj;
	}
    	
	function __construct($configuration) {
		$config = $configuration->getDbConfig();

		try {
			parent::__construct($config['host'], $config['username'],
$config['password'], $config['db']);
		} catch (WarningException $we) {
            if (mysqli_connect_error()){
            	throw new DBConnectException(mysqli_connect_error(),
mysqli_connect_errno());
			}
		}	
		parent::query("SET NAMES 'utf8'");
	}

   function __destruct() {
		@$this->close();   	
   }
	
	function query($query) {
		if (($result = parent::query($query)) != false) {
			if (eregi("^select", $query)) {
				return new QueryResult($result);
			} else {
				return new QueryResult(false, $this->affected_rows);
			}
		} else {
			throw new SQLException($this->error, $this->errno, $query);
		}
	}
	
	function getInsertId() {
		return $this->insert_id;
	}
}

------------------------------------

I think this is some new bug in 5.0.5 version and I want to help to fix
it. But I don't know how. What should I do?

Thanks,

Petr

--
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