1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 An exception occurred: Mysqli statement execute error

Discussion in 'Installation, Upgrade, and Import Support' started by Thierry Martin, Mar 9, 2014.

  1. Here is what I received upon completing installation - I have no idea what this means:

    An exception occurred: Mysqli statement execute error : Prepared statement needs to be re-prepared in /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/Zend/Db/Statement/Mysqli.php on line 214

    Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219
    XenForo_Model->fetchAllKeyed() in XenForo/Model/RoutePrefix.php at line 41
    XenForo_Model_RoutePrefix->getPrefixesByRouteType() in XenForo/Model/RoutePrefix.php at line 54
    XenForo_Model_RoutePrefix->getPrefixesForRouteCache() in XenForo/Link.php at line 479
    XenForo_Link::_loadHandlerInfoForGroup() in XenForo/Link.php at line 396
    XenForo_Link::_getPrefixHandler() in XenForo/Link.php at line 362
    XenForo_Link::_buildLink() in XenForo/Link.php at line 93
    XenForo_Link::buildPublicLink() in XenForo/Dependencies/Admin.php at line 195
    XenForo_Dependencies_Admin->getEffectiveContainerParams() in XenForo/FrontController.php at line 612
    XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
    XenForo_FrontController->run() in /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/admin.php at line 13
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    This error pops up from time to time and seems to be related to some versions of MySQL and PHP.

    Restarting the MySQL server should fix it.
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  4. Well this error page appeared at the end of my import, but the import was reported as successful. Except for some HTML code not converted to BB code, everything seems to be working fine. My question is - can I just ignore these Mysqli statement execute errors or does it indicate some corruption exists in my imported files and I have to redo the import?
     
  5. Here is the only server error log - is this something I can ignore?

    Server Error Log
    Error Info
    Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Duplicate entry '13725' for key 'PRIMARY' - library/Zend/Db/Statement/Mysqli.php:214
    Generated By: Thierry Martin, Today at 4:22 AM
    Stack Trace
    #0 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
    #1 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
    #2 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
    #3 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/DataWriter.php(1612): Zend_Db_Adapter_Abstract->insert('xf_attachment', Array)
    #4 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/DataWriter.php(1601): XenForo_DataWriter->_insert()
    #5 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/DataWriter.php(1393): XenForo_DataWriter->_save()
    #6 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/Model/Import.php(1890): XenForo_DataWriter->save()
    #7 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/Model/Import.php(1936): XenForo_Model_Import->importAttachment(13725, 'Screen shot 201...', '/var/www/vhosts...', '1', 'post', '804018', 1348777890, Array, Array, '(THERE IS CODE HERE TO VIEW ATTACHENT I REMOVED IT BECAUSE IT WAS SCREWING UP THE POST)
    #8 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/Importer/vBulletin4x.php(114): XenForo_Model_Import->importPostAttachment(13725, 'Screen shot 201...', '/var/www/vhosts...', '1', '804018', 1348777890, Array, Array, 'THERE IS CODE HERE TO VIEW ATTACHENT I REMOVED IT BECAUSE IT WAS SCREWING UP THE POST)
    #9 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/Importer/Abstract.php(97): XenForo_Importer_vBulletin4x->stepAttachments(13724, Array)
    #10 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/ControllerAdmin/Import.php(187): XenForo_Importer_Abstract->runStep(Object(XenForo_ControllerAdmin_Import), Object(XenForo_ImportSession), 'attachments', 13724, Array)
    #11 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/ControllerAdmin/Import.php(135): XenForo_ControllerAdmin_Import->_runStep(Object(XenForo_Importer_vBulletin4x), Object(XenForo_ImportSession), 'attachments', 13724, Array)
    #12 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_Import->actionImport()
    #13 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #14 /var/www/vhosts/onlinetradersforum.com/httpdocs/aaxenforo/admin.php(13): XenForo_FrontController->run()
    #15 {main}
    Request State
    array(3) {
    ["url"] => string(63) "[url]http://onlinetradersforum.com/aaxenforo/admin.php?import/import[/url]"
    ["_GET"] => array(1) {
    ["import/import"] => string(0) ""
    }
    ["_POST"] => array(0) {
    }
    }[MORE ATTACHMENT CODE][/ATTACH]
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This is an id collision for attachment id 13725. Did you post any new attachments while you were importing?

    I'm not sure if the initial "re-prepared" error could be responsible for this.

    I suggest running the import again from scratch.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The specific error in your first post is a server problem which can usually be ignored. If it's something you want to try to fix then forward this to your host or server admin:

    http://xenforo.com/community/threads/error-on-install.17901/#post-236565
     

Share This Page