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

XF 1.4 vB 3.7.2 -> XF 1.4.5 Import Error (Table prefix)

#1
Hi,

I'm trying to import a large forum from vB3.7.2 to XF 1.4.5, all of the credentials I have are correct, but there is no table prefix (verified through the database and by checking config.php). Yet when I validate the configuration of the database credentials I get the error:

"The table prefix or database name is not correct."

We are moving this forum from one server to a new server, but the credentials for the existing server are correct. I'm not the owner of the forum in question, but I'm doing the import in this case, and he has verified multiple times now that these are the correct credentials. Is there any other reason why this error would appear?

Any help would be greatly appreciated!
 

Mike

XenForo developer
Staff member
#2
This often indicates that your copy of the database isn't complete and it doesn't have the expected tables. I believe we're checking for the "user" table.
 
#3
Thanks for the response, Mike!

Could this be a result of pruning users and content periodically? It's a 15 year old forum that was being pruned at routine intervals due to hardware constraints (based on content ids, it has had over 8.6 million posts, but only 1.2 million are present in the database, and over 354,000 users, with only 134,000 still present today), just wondering if that could have caused this?
 

Mike

XenForo developer
Staff member
#4
No, it would only happen from the table we're checking for not being there (which usually means the prefix is wrong).
 
#5
Hi Mike,

Just confirmed that the tables are present. From the owner of the site, the tables read as such:

Your MySQL connection id is 174076 to server version: 4.0.17-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use vbulletin;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+----------------------------+
| Tables_in_vbulletin |
+----------------------------+
| access |
| adminhelp |
| administrator |
| adminlog |
| adminmessage |
| adminutil |
| album |
| albumpicture |
| announcement |
| announcementread |
| attachment |
| attachmentpermission |
| attachmenttype |
| attachmentviews |
| avatar |
| award |
| award_cat |
| award_user |
| bbcode |
| bookmarksite |
| calendar |
| calendarcustomfield |
| calendarmoderator |
| calendarpermission |
| cpsession |
| cron |
| cronlog |
| customavatar |
| customprofilepic |
| datastore |
| deletionlog |
| editlog |
| event |
| externalcache |
| faq |
| forum |
| forumpermission |
| forumprefixset |
| forumread |
| groupmessage |
| groupmessage_hash |
| holiday |
| humanverify |
| hvanswer |
| hvquestion |
| icon |
| imagecategory |
| imagecategorypermission |
| infraction |
| infractionban |
| infractiongroup |
| infractionlevel |
| language |
| mailqueue |
| moderation |
| moderator |
| moderatorlog |
| notice |
| noticecriteria |
| passwordhistory |
| paymentapi |
| paymentinfo |
| paymenttransaction |
| phrase |
| phrasetype |
| picture |
| picturecomment |
| picturecomment_hash |
| plugin |
| pm |
| pmreceipt |
| pmtext |
| podcast |
| podcastitem |
| poll |
| pollvote |
| post |
| postedithistory |
| posthash |
| postindex |
| postindex_temp455282 |
| postindex_temp461045 |
| postindex_temp497188 |
| postindex_temp509289 |
| postindex_temp515837 |
| postlog |
| postparsed |
| prefix |
| prefixset |
| product |
| productcode |
| productdependency |
| profilefield |
| profilefieldcategory |
| profilevisitor |
| proxycache |
| ranks |
| reminder |
| reputation |
| reputationlevel |
| rssfeed |
| rsslog |
| search |
| session |
| setting |
| settinggroup |
| sigparsed |
| sigpic |
| smilie |
| socialgroup |
| socialgroupmember |
| socialgrouppicture |
| spamlog |
| stats |
| strikes |
| style |
| subscribeevent |
| subscribeforum |
| subscribethread |
| subscription |
| subscriptionlog |
| subscriptionpermission |
| tachyforumcounter |
| tachyforumpost |
| tachythreadcounter |
| tachythreadpost |
| tag |
| taggregate_temp_1240181760 |
| taggregate_temp_1240185360 |
| taggregate_temp_1240188960 |
| taggregate_temp_1240192560 |
| taggregate_temp_1240196160 |
| taggregate_temp_1240199760 |
| taggregate_temp_1240203360 |
| taggregate_temp_1240206960 |
| taggregate_temp_1240210560 |
| taggregate_temp_1240214160 |
| taggregate_temp_1240217760 |
| taggregate_temp_1240221360 |
| taggregate_temp_1240224960 |
| taggregate_temp_1240228560 |
| taggregate_temp_1240232160 |
| taggregate_temp_1240235760 |
| taggregate_temp_1240239360 |
| taggregate_temp_1240242960 |
| taggregate_temp_1240246560 |
| taggregate_temp_1240250160 |
| taggregate_temp_1266494160 |
| tagsearch |
| tagthread |
| template |
| templatehistory |
| thread |
| threadrate |
| threadread |
| threadredirect |
| threadviews |
| upgradelog |
| user |
| useractivation |
| userban |
| userchangelog |
| usercss |
| usercsscache |
| userfield |
| usergroup |
| usergroupleader |
| usergrouprequest |
| userlist |
| usernote |
| userpromotion |
| usertextfield |
| usertitle |
| visitormessage |
| visitormessage_hash |
| word |
+----------------------------+
176 rows in set (0.00 sec)

Also, the prefix is non-existent, there is no prefix set.
 
Last edited:
#6
The owner of the site has gone through to repair any errors found in the tables, with none turning up. At this point, I'm stumped.

If it is indeed a prefix issue, with no prefix actually being set, is there a workaround?
 

Mike

XenForo developer
Staff member
#7
An empty prefix will be fine. We haven't had any reports of this before (except when expected).

If you're sure the DB is complete, I can only suggest double checking the credentials are connecting to the DB/server you're expecting. Beyond that, code edits may need to be done to get the full error direct from the DB (XenForo_Importer_vBulletin, around line 140).
 
#8
Hi Mike,

I'm definitely sure the DB is complete at this point, and the credentials are definitely correct. If I may ask, what exactly would I need to change in the vBulletin.php file in order to show the full errors?

Thanks!
 

Chris D

XenForo developer
Staff member
#9
At line 141, add the following:
PHP:
throw $e;
The rest of the code in that block should now look like:
PHP:
        catch (Zend_Db_Exception $e)
        {
            throw $e;
            if ($config['db']['dbname'] === '')
            {
                $errors[] = new XenForo_Phrase('please_enter_database_name');
            }
            else
            {
                $errors[] = new XenForo_Phrase('table_prefix_or_database_name_is_not_correct');
            }
        }
You should get the full error returned.
 
#10
Thanks, Chris!

It's now giving the following error:

Server Error
Mysqli prepare error: Unknown command

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in XenForo/Importer/vBulletin.php at line 137
  5. XenForo_Importer_vBulletin->validateConfiguration() in XenForo/Importer/vBulletin.php at line 31
  6. XenForo_Importer_vBulletin->configure() in XenForo/ControllerAdmin/Import.php at line 76
  7. XenForo_ControllerAdmin_Import->actionConfig() in XenForo/FrontController.php at line 347
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in /var/www/html/admin.php at line 13
 

Mike

XenForo developer
Staff member
#11
This would appear to be some sort of communication error with the target server. Can you confirm the MySQL version on that server?
 

Chris D

XenForo developer
Staff member
#14
I did see some references to that particular error and old MySQL versions, earlier.

Ideally you're going to either need to upgrade MySQL or move the database off to a server that has a newer MySQL build.
 
#15
Minimum MySQL version is 5.0 - see the requirements here: https://xenforo.com/purchase/
The server running XenForo is running the latest version of MariaDB

I did see some references to that particular error and old MySQL versions, earlier.

Ideally you're going to either need to upgrade MySQL or move the database off to a server that has a newer MySQL build.
Not sure if you can answer this or not, but is there an upgrade path from such an old version?
 

Brogan

XenForo moderator
Staff member
#16
The server running XenForo is running the latest version of MariaDB
Are you trying to do an import between servers?

The source and destination databases should really be on the same server.

You just need the database and any avatar/attachment files (if they aren't stored in the database), so it't not necessary to actually install the software for the source forum.
 

Brogan

XenForo moderator
Staff member
#18
Tack a backup of the VB forum.
Create a new database instance on the new server and import the VB backup to it.
Then copy any files as required (attachments, etc.) to a directory on the server.

Then run the import.