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

XF 1.4 phpBB import error

Discussion in 'Installation, Upgrade, and Import Support' started by Wicksy33, Nov 5, 2014.

  1. Wicksy33

    Wicksy33 Member

    I have just done and import from my phpbb forum to xenforo 1.4 using the import tool

    its come up with this, any idea on the issue and how to fix it?

    Server Error

    Mysqli statement execute error : Duplicate entry '702' for key 'PRIMARY'

    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 Zend/Db/Adapter/Abstract.php at line 574
    Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1624
    XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1613
    XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1405
    XenForo_DataWriter->save() in XenForo/Model/Import.php at line 1890
    XenForo_Model_Import->importAttachment() in XenForo/Model/Import.php at line 1936
    XenForo_Model_Import->importPostAttachment() in XenForo/Importer/PhpBb3.php at line 2089
    XenForo_Importer_PhpBb3->stepAttachments() in XenForo/Importer/Abstract.php at line 97
    XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 187
    XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 135
    XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 347
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /homepages/1/d535499013/htdocs/vgforums/testsite/admin.php at line 13
  2. Mike

    Mike XenForo Developer Staff Member

    When this happens, it always seems to be the attachments step. I think it usually relates to a timeout happening and then the subsequent refresh failing.

    To try to workaround it, you need to go into something like phpMyAdmin and into the xf_attachment table. Look for any entries with an attachment_id of 702 or greater and remove them. Then try to continue the import. Did that solve it?
  3. Wicksy33

    Wicksy33 Member

    Just tried this and came up with a fatal error page
    Fatal error: Out of memory (allocated 82313216) (tried to allocate 9792 bytes) in /homepages/1/d535499013/htdocs/vgforums/testsite/library/XenForo/Image/Gd.php on line 215
  4. Mike

    Mike XenForo Developer Staff Member

    Right, that's likely what happened before or similar. You're likely to have to repeat the process I explained above to continue, in addition to adding the following to config.php:
    $config['maxImageResizePixelCount'] = 10000000;
    Your server doesn't seem to allow you to use the full PHP memory_limit value and thumbnailing large images needs a large amount of memory. That line will prevent thumbnailing for images that are larger than ~10 megapixels (the default is 20 megapixels).

    Apply that change and refresh the import; you'll probably get the duplicate ID error, so you'll have to repeat that step. You should be able to continue after that. If you get an out of memory error again, you can reduce the value of that config.php line further.
  5. Wicksy33

    Wicksy33 Member

    is that the config.php on PHPbb side or xenforo side?
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Add it to the XenForo \library\config.php file.
  7. Wicksy33

    Wicksy33 Member

    That worked a treat guys thank you, had to change it to this for it to run through tho

    $config['maxImageResizePixelCount'] = 5000000;
    Mike likes this.

Share This Page