Thursday, November 22, 2007

PHP : Fatal error: Trying to clone an uncloneable object of class mysqli

When using Zend Compatibility Mode, you'll not be able to use MySQLi as you would like. Each time you try to create a new object you'll get:

"Fatal error: Trying to clone an uncloneable object of class mysqli in XXX".

In order to use the mysqli objects you'll need to deactivate Zend Compatibility mode before calling the connect procedure:

ini_set('zend.ze1_compatibility_mode', 0);
$mysqli = new mysqli(hostname,username,password,[database]);

for rayzz.. edit /var/www/rayzz/common/classes/adodb/drivers/adodb-mysqli.inc.php

** Issue happening under Unix and Windows OS.

No comments:

 Simple Python Calculator This script will allows your to calculate the integers given with the chosen operation. You can add, substract, mu...