Server issue Mysqli statement execute error : Prepared statement needs to be re-prepared


Active member
I saw quite a few of these in my error logs.

#0 /var/www/ Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/ Zend_Db_Statement->execute(Array)
#2 /var/www/ Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /var/www/ Zend_Db_Adapter_Abstract->insert('xf_ip', Array)
#4 /var/www/ XenForo_Model_Ip->logIp(1494, 'post', 51922, 'insert', NULL, NULL)
#5 /var/www/ XenForo_Model_Ip::log(1494, 'post', 51922, 'insert', NULL)
#6 /var/www/ XenForo_DataWriter_DiscussionMessage->_updateIpData()
#7 /var/www/ XenForo_DataWriter_DiscussionMessage->_postSave()
#8 /var/www/ XenForo_DataWriter->save()
#9 /var/www/ XenForo_ControllerPublic_Thread->actionAddReply()
#10 /var/www/ XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /var/www/ XenForo_FrontController->run()
#12 {main}


XenForo developer
Staff member
Unfortunately, this appears to be an issue in some versions of MySQL and PHP (or OS specific). Restarting the MySQL server will apparently fix it.

The conditions that should trigger that aren't applicable at all to us, so there's really no way to workaround it.


Active member
What is the underlying problem? Is it just a temporary bug on a version of MySql and/or PHP?

This is what I use.

PHP 5.3.5-1ubuntu7.3 with Suhosin-Patch (cli) (built: Oct 13 2011 22:20:48)
mysql Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (x86_64) using readline 6.2
Ubuntu 11.04