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

XF 1.1 Importing phpBB's attachments (complex story)

Discussion in 'Installation, Upgrade, and Import Support' started by Shinracorp, Jan 26, 2012.

  1. Shinracorp

    Shinracorp Member

    Alright so it's not really easy explaining this but I'll try.

    The very first site I had was a phpBB2 site that has over 4000 members and over 11 GB of attachments (yes Gigabytes lol) so I asked my old host if I can have access to the database, he gave me a link I downloaded it (However he didn't give me a link to the files and images) and made my own server in which I did a database convert from phpBB2 to phpBB3. So the site was running phpBB3 for a while.

    Last month, I got XenForo (love it btw) now I imported the phpBB3 database into it, which works beautifully however as said before, I didn't get the attachments at the time, so this is where the problem is. The old host gave me all my attachments (took forever to download after all 11 GB lol) and I was wondering if there's a way I can add those attachments to XenForo even when phpBB3 was already imported in. (So that all the posts that were in phpBB2 can have there attachments).

    I do not mind if I have to do lots of SQL queries in order for it to work. Just want it to work is all.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The attachments step needs to be done at the time of import.

    You may however be able to have a custom script created which can read from the old database and write to the new one specifically for the purpose of importing attachments only.
     
  3. Shinracorp

    Shinracorp Member

    I suppose I could do that, but sadly my programming skills is very limited to PHP and HTML 4 and 5 only and I know a tiny bit of SQL commands. I hope someone is willing to help me out with this cause let's just say the community wasn't happy when they saw no attachments, so I left the old site open to them.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    A custom script is possible but it would be complicated. You really need to run the import again to get the attachments. But there is no easy way to deal with duplicates from the previous import so you should reinstall XF and start fresh.
     
  5. Shinracorp

    Shinracorp Member

    Alright so I decided to do a re-import of it, now before I do simple question. Re-importing it won't make me lose all the posts and attachments that have been created in XenForo right? (I made backups so I'm fine if it doesn't work :p)
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Shinracorp likes this.
  7. Shinracorp

    Shinracorp Member

    Alright thank you Brogan
     
  8. Shinracorp

    Shinracorp Member

    Ok I tried a fresh install of XenForo with the import of phpBB3 (I deleted the database as well) but it gave me this error:

    Mysqli statement execute error : Duplicate entry '19548' for key 'PRIMARY'
    1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
    4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1591
    5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1580
    6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1381
    7. XenForo_DataWriter->save() in XenForo/Model/Import.php at line 767
    8. XenForo_Model_Import->importUser() in XenForo/Importer/PhpBb3.php at line 998
    9. XenForo_Importer_PhpBb3->_importUser() in XenForo/Importer/PhpBb3.php at line 821
    10. XenForo_Importer_PhpBb3->_importOrMergeUser() in XenForo/Importer/PhpBb3.php at line 610
    11. XenForo_Importer_PhpBb3->stepUsers() in XenForo/Importer/Abstract.php at line 77
    12. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 180
    13. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 132
    14. XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 310
    15. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    16. XenForo_FrontController->run() in /home/wc3u6428/public_html/admin.php at line 13
    How do I fix this? Thank you.
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Duplicate key on user insert.

    Did you select the option to preserve the source ids? That might cause this error if your XF database already has users in it.
     
  10. Shinracorp

    Shinracorp Member

    Well I deleted the Xenforo database though and deleted and re-uploaded the files so it wouldn't have a conflict with the old and new databases. But I'll try the without Retain ID

    Well it worked but now I need to fix the maximum allowed memory has exceeded error for the attachments. Guess I'll put my php.ini to 128M
     

Share This Page