XF 1.5 Need help with SMF Import

maethlin

Member
Made a lot of progress tonight but seriously stumped on this.

Some high level background:
  • Moving from SMF2 to Xenforo
  • Moving from VPS to my own EC2 instance
  • Xenforo installed successfully, took backup of fresh installed DB
  • Did a basic MYSQL export from phpmyadmin from SMF2 host and copied backup file to Xenforo host
  • Did a full import of the SQL backup file onto mysql on Xenforo host
  • rsync'ed attachments directory from SMF2 host to Xenforo host
  • Kicked off import process on Xenforo, all steps worked well until "Import Threads and Posts" step
When I do that step, this is what I'm seeing:

Code:
Server Error

Mysqli statement execute error : Duplicate entry '1' 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 1638
XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1627
XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
XenForo_DataWriter->save() in XenForo/Model/Import.php at line 617
XenForo_Model_Import->_importData() in XenForo/Model/Import.php at line 1627
XenForo_Model_Import->importThread() in XenForo/Importer/SMF.php at line 1750
XenForo_Importer_SMF->stepThreads() in XenForo/Importer/Abstract.php at line 124
XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 189
XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 241
XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 184
XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /var/www/html/bb/admin.php at line 13

Some googling shows this may be due to plugins (maybe Tapatalk?) on my SMF2 server.

That said, I don't know how to proceed from here. I am doing this trial import before actually forcing my users to go through downtime, so I REALLY would rather not have to start uninstalling plugins on my active SMF2 server right now just to do this trial import.

Is there just some table I could edit on my imported smf database on my new Xenforo host that I could edit in some way to get past this error?
 
Thanks @Brogan - I thought that was odd since I didn't think I added any content before doing my initial backup. However I restored the initial mysql Xenforo DB and noticed I had done one test post with the admin just to see if everything worked. I guess that was enough to throw it off. I deleted that post (and the initial default message boards), then restarted import and it now seems to be working... 35% and counting!

Will update here if things finish okay.

I may also do a full writeup after I'm done of my entire experience. The Xenforo docs are pretty good but I find they don't cover enough of the pre-reqs and finer details so I've been taking heavy notes for my own purposes if I need to start over (my notes would cover an EC2 based install but should be applicable for most people doing any vanilla linux install, particularly Ubuntu-based.)
 
Dangit, was doing well but towards the end of attachment import now I'm getting this.... any ideas @Brogan ?

Code:
Server Error

copy(/var/www/html/bb/attachments/43646_36a04ddee1ffaf18fa18d013d7e89e2de51b7996): failed to open stream: Permission denied

XenForo_Application::handlePhpError()
copy() in XenForo/Importer/SMF.php at line 2002
XenForo_Importer_SMF->stepAttachments() in XenForo/Importer/Abstract.php at line 124
XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 189
XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 137
XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /var/www/html/bb/admin.php at line 13
 
As far as XF is concerned, the /data and /internal data directories should be 0777 recursively.

This looks to be an issue with the source directories/files though, so you will need to ensure XF can read and copy all of those.
 
Just did a blunt 777 on attachments directory and it worked! Will tighten this stuff down later as I get paranoid about 777 perms. Thanks for all your help, you da man!
 
Back
Top Bottom