I am ready to upgrade the web server in real time from PHP 5.2.12 to 5.3.5. In preparation, I performed an update on the second server, which is a mirror of the living (server "dev"). Both servers use FreeBSD, and both ports use PHP and MySQL to install. The live server uses MySQL 5.0.89, the recently updated dev server uses 5.1.54.
The following code executes as expected on a real server (PHP 5.2.12 / 5.0.89), returning the value of the AUTO_INCREMENT line that was just inserted. This function is part of the database class that is used throughout the node, where "$ this β _ private ['cn']" is a resource reference.
public function insert ($sql=false) {
@mysql_select_db($this->_private['db_name'], $this->_private['cn']);
$res = null;
if (false !== $sql) {
$query_obj = mysql_query($sql, $this->_private['cn']);
if ($query_obj)
$res = mysql_insert_id($this->_private['cn']);
}
return $res;
}
dev (5.3.5/5.1.54) . - null ( , ), ZERO. , ββ , . 121288, PHP. . mysql_error() . E_ALL, .
ARGH! ?