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

XF 1.2 Importing vB 4.x to xenForo

Discussion in 'Installation, Upgrade, and Import Support' started by Nnirvi, Feb 19, 2014.

  1. Nnirvi

    Nnirvi Member

    Hi!

    I'm trying to import a rather large vBulletin database to xF. I only have the sql dump - for now I have no access to the current vB installation so I can't access its config.php.

    I was able to bring the sql to a database on the same server as the xF installation. However, when I try to import the data inside xF, I get the error "The table prefix or database name is not correct."

    The db name is correct and unless HeidiSQL hides table prefixes somehow, there are none. Any ideas? Someone mentioned that the error might be result of incomplete db which would suck at this point because importing the dumb to the server took roughly 20 hours.
     
  2. Nnirvi

    Nnirvi Member

    And sorry for the prefix, the xF version is 1.2.4 - I assumed I have the latest because it was bought recently.
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    The error seems to indicate that one of those two values is incorrect.

    The importer won't start until it can establish a connection so the issue of corruption shouldn't be a factor at that point.
     
  4. Nnirvi

    Nnirvi Member

    Ok. I'm 100% certain that the db name is correct. Can't think of anything else that there is a prefix, it's just not clearly visible on HeidiSQL. Do you have any idea where in the db I could find the prefix?
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    What do the table names look like?
     
  6. Nnirvi

    Nnirvi Member

    They're all without a prefix: access, action, ad, etc. There are no prefixes in phpMyadmin either. I've also run several checks on the db while being careful not to change anything. I even tried to put a blank space to the prefix field in the importer.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    And you're sure the database name you're entering is correct?

    I don't really know what else to suggest; I've only done a few vB imports and once the criteria were correct it went smoothly.
     
  8. Nnirvi

    Nnirvi Member

    Positive, even though I'm starting to get a blurry vision :)

    This must be one of those things where it's something outrageously obvious or just pure voodoo. Are you sure that the db can't be corrupt?
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    I suppose there's always that possibility but it's not something I've heard of before now.
     
  10. Nnirvi

    Nnirvi Member

    Ok. One more thing - if I enter either the username or db name wrong, I get an access denied message. If both are correct, I get the name or prefix incorrect message. Does this indicate anything?
     
  11. Nnirvi

    Nnirvi Member

    Is it possible that I don't have enough priviliges? Both db users (vB and xF) have all the rights to their respective databases but I don't have root access to the server. For example, I can't turn sql logging on.
     
  12. Mike

    Mike XenForo Developer Staff Member

    You would likely get a different permission error, though it's possible (particularly if you have permission to the DB but not to run SELECT queries, for example).

    The query that is being run is:
    Code:
                $db->query('
                    SELECT userid
                    FROM ' . $config['db']['prefix'] . 'user
                    LIMIT 1
                ');
    If this fails, it will display that error.
     
  13. Nnirvi

    Nnirvi Member

    It seems that at least the vB database user can use the select script. Any other tips to test the privileges?
     
  14. Mike

    Mike XenForo Developer Staff Member

    Not really. The code in question is in library/XenForo/Importer/vBulletin.php:
    Code:
            try
            {
                $db->query('
                    SELECT userid
                    FROM ' . $config['db']['prefix'] . 'user
                    LIMIT 1
                ');
            }
            catch (Zend_Db_Exception $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 could try removing the try and the whole catch block (leave the query). That would give the exact error then.
     
  15. Nnirvi

    Nnirvi Member

    Ok, this is what I get: Mysqli prepare error: Table 'pelitdump.user' doesn't exist
     
  16. Mike

    Mike XenForo Developer Staff Member

    The error message is generally correct then unfortunately -- MySQL doesn't see the user table in the pelitdump database. (But the database is presumably known.) There's not a lot more we can recommend from our side. Some element of the MySQL details are incorrect or the restore wasn't done correctly.
     
  17. Nnirvi

    Nnirvi Member

    How does this differ from entering a bogus username? Because that gives a different error message.
     
  18. Mike

    Mike XenForo Developer Staff Member

    Because the details are valid and (presumably) the database is valid, but MySQL isn't seeing the "user" table in that database (like if you pointed it to the XF database, which wouldn't have that table, for example).
     
  19. Nnirvi

    Nnirvi Member

    So the database is either corrupted or somehow invalid, yes?
     
  20. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, that's what the errors are indicating.
     

Share This Page