Resource icon

vBulletin Big Board Importer [vBulletin 3 + vBulletin 4] [Paid] 1.5.0

No permission to buy ($150.00)
@Jake Bunce

It's no stress at the moment (now it seems to have completed the rebuilds); this is only a VM for testing, but I'm pretty sure I built the one I've been using most recently with everything (apart from swap) on one partition to keep it simple.

As for Enhanced Search, I've certainly not got that installed on my test-VM; but I'll make sure we're on it for the live box.

Thanks

R
 
Hi
Big board importer throws few errors. Can you advice?
C:\Users\user>C:\wamp\bin\php\php5.3.13\php.exe c:\wamp\www\xenforoeng\Expor
t.php


!!!WARNING!!! - set charset to 'binary' in XenForo_Application:loadDb()

################################################
### XenForo Big Board vB3/vB4 -> XF Importer ###
### Original version created by Shawn Hogan ###
### Modified by Slavik and Jake Bunce ###
### Version Number: 1.2.0 ###
################################################

1 - Posts
2 - Users
3 - Threads
4 - Private Messages
5 - Avatars
6 - Attachments
7 - Forums
8 - Miscellaneous
9 - Everything

Make Selection [1-9]: 9

exporting posts...
[forking process for posts]
PHP Fatal error: Call to undefined function pcntl_fork() in C:\wamp\www\xenforo
eng\Export.php on line 787
PHP Stack trace:
PHP 1. {main}() C:\wamp\www\xenforoeng\Export.php:0
PHP 2. DigitalPointExporter->posts() C:\wamp\www\xenforoeng\Export.php:1904

Fatal error: Call to undefined function pcntl_fork() in C:\wamp\www\xenforoeng\E
xport.php on line 787

Call Stack:
0.0066 1154648 1. {main}() C:\wamp\www\xenforoeng\Export.php:0
1.9310 2982616 2. DigitalPointExporter->posts() C:\wamp\www\xenforoeng\
Export.php:1904
 
Verify you meet the system requirements. More specifically that you have the PCNTL extension.

Also change line 677(ish) in library/XenForo/Application.php from 'charset' => 'utf8' to 'charset' => 'binary'.
 
For those who have VBulletin table prefixes (eg vb_ ) and get Export.php table name errors because it doesn't handle prefixes, run this script before Export.php to remove VB prefixes in bulk. Export.php will then find the tables it is expecting.

This is from http://ruleant.blogspot.de/2009/03/rename-multiple-tables-in-mysql.html (thanks DIETER ADRIAENSSENS), but with the first % wildcard from the SQL string search removed so that it finds vb_mv-vb-table and but not my-vb_table for example

Code:
<?php
$db_server = ".......";    // hostname MySQL server
$db_username = "........";   // username MySQL server
$db_password = "..........";   // password MySQL server
$db_name = "vb_database";       // database name

$pattern = "vb_";          // search string
$new_pattern = "";  // replacement string,
                                // can be empty

// login to MySQL server
$link = mysql_connect( $db_server, $db_username, $db_password);

if (!$link)
{
  die('Could not connect: ' . mysql_error());
}

// list all tables in the database containing the search pattern
$sql = "SHOW TABLES FROM `" . $db_name . "`";
$sql .= " LIKE '" . $pattern . "%'";

$result = mysql_query ( $sql, $link );
if (!$result)
{
  die("Invalid query: " . mysql_error( $link ));
}

$renamed = 0;
$failed = 0;

while ( $row = mysql_fetch_array ($result) )
{
  // rename every table by replacing the search pattern
  // with a new pattern
  $table_name = $row[0];
  $new_table_name = str_replace ( $pattern, $new_pattern, $table_name);

  $sql = "RENAME TABLE `" . $db_name . "`.`" . $table_name . "`";
  $sql .= " TO `" . $db_name . "`.`" . $new_table_name . "`";

  $result_rename = mysql_query ( $sql, $link );
  if ($result_rename)
  {
    echo "Table `" . $table_name . "` renamed to :`";
    echo $new_table_name . "`.\n";
    $renamed++;
  }
  else
  {
    // notify when the renaming failed and show reason why
    echo "Renaming of table `" . $table_name . "` has failed: ";
    echo mysql_error( $link ) . "\n";
    $failed++;
  }
}

echo $renamed . " tables were renamed, " . $failed . " failed.\n";

// close connection to MySQL server
mysql_close( $link );
?>
 
Last edited:
Also, what may be a stupid question, but I can't find a definitive answer:

Can I just run Export.php over and over until I get it right without fear of duplicate data insertion?
 
Thanks - superb piece of work by the way. One suggestion though, I think a wiki page (on Github?) would be really useful for this. There are common errors and cures and a self-generating and user maintained manual would be useful and could potentially save a lot of time and also repetition in this thread.
 
I have just checked table collation, and all my VB tables are latin1_swedish_ci. Character sets and MySQL collations are something I only ever paid lip service to, and really don't have a grip of. To save me a long study period, could someone tell me if I should use the option in Export.php:

// USE THIS SETTING TO SPECIFY AN EXTRA PIPE FOR ALL OUTPUT RECORDS

// EXAMPLE IS TO PIPE OUTPUT THROUGH iconv IF CHARACTER ENCODING CHANGES ARE NEEDED

// '| iconv -f LATIN1 -t UTF8'

publicstatic$extraOutCommand= '| iconv -f LATIN1 -t UTF8';


My trial import seems OK so far without this, and I hadn't paid any attention to it until now. Is there are particular error that I should look for that would show whether I need to do this or not?
 
I have just checked table collation, and all my VB tables are latin1_swedish_ci. Character sets and MySQL collations are something I only ever paid lip service to, and really don't have a grip of. To save me a long study period, could someone tell me if I should use the option in Export.php:

// USE THIS SETTING TO SPECIFY AN EXTRA PIPE FOR ALL OUTPUT RECORDS

// EXAMPLE IS TO PIPE OUTPUT THROUGH iconv IF CHARACTER ENCODING CHANGES ARE NEEDED

// '| iconv -f LATIN1 -t UTF8'

publicstatic$extraOutCommand= '| iconv -f LATIN1 -t UTF8';


My trial import seems OK so far without this, and I hadn't paid any attention to it until now. Is there are particular error that I should look for that would show whether I need to do this or not?

Watch for "Incorrect string value" errors when running Import.php. That means there is a character encoding problem where you would need the $extraOutCommand.
 
Thanks Jake. I didn't get any string value errors so have left that section commented.

Verify you meet the system requirements. More specifically that you have the PCNTL extension.

Also change line 677(ish) in library/XenForo/Application.php from 'charset' => 'utf8' to 'charset' => 'binary'.

Does this need to be changed back to utf8 after the import?
 
If you mean this: grant all privileges on *.* to gamerz_vb@localhost; for the vbulletin database, I just tried that, and then ran the Export.php again, and still got the same problem:

Make Selection [1-9]: 2

exporting users...
user & user authenticateroot@server [~]#

Hi
I have the same issue, when export users it breaks and throws with this error
exporting users...
user & user authenticateAn unexpected error occurred. Please try again later.

Here is my import status Any help is appreciated .

91310 Feb 17 13:04 xf_edit_history.txt
840535 Feb 17 13:04 xf_ip.txt
0 Feb 17 13:04 xf_liked_content.txt
26422873 Feb 17 13:04 xf_post_aa.txt
0 Feb 17 13:04 xf_report_comment.txt
0 Feb 17 13:04 xf_report.txt
1056763 Feb 17 13:05 xf_thread.txt
217964 Feb 17 13:05 xf_thread_user_post.txt
68427 Feb 17 13:05 xf_thread_watch.txt
0 Feb 17 13:11 xf_user_authenticate.txt
0 Feb 17 13:11 xf_user.txt
 
Just want clarification - when doing an initial import from vB, I'd imagine it would make sense to have the vB forum turned off, right? Or can the import run in the background while the forums are in use? And just turn it off for the final import so that nothing is being written to the db for the final transition?
 
Hi
I have the same issue, when export users it breaks and throws with this error
exporting users...
user & user authenticateAn unexpected error occurred. Please try again later.

Here is my import status Any help is appreciated .

91310 Feb 17 13:04 xf_edit_history.txt
840535 Feb 17 13:04 xf_ip.txt
0 Feb 17 13:04 xf_liked_content.txt
26422873 Feb 17 13:04 xf_post_aa.txt
0 Feb 17 13:04 xf_report_comment.txt
0 Feb 17 13:04 xf_report.txt
1056763 Feb 17 13:05 xf_thread.txt
217964 Feb 17 13:05 xf_thread_user_post.txt
68427 Feb 17 13:05 xf_thread_watch.txt
0 Feb 17 13:11 xf_user_authenticate.txt
0 Feb 17 13:11 xf_user.txt
I was able to solve the above issues in Export.php , but when I ran the import. php I see these errors

mysql -hlocalhost testdb -uforum_usercp -pjPMHAl -N -q -e " DELETE FROM xf_user_external_auth WHERE user_id > 1 OR provider = 'facebook'; REPAIR TABLE xf_user_external_auth;xf_user_privacyERROR 2 (HY000) at line 1: File '/app/apache/forum/xenbig/importdataxf_user_privacy.txt' not found (Errcode: 2)
(0.01s)...
What is error code 2?

Any advice?
 
Just want clarification - when doing an initial import from vB, I'd imagine it would make sense to have the vB forum turned off, right? Or can the import run in the background while the forums are in use? And just turn it off for the final import so that nothing is being written to the db for the final transition?

Turning it off for the final is fine. You don't need to turn it off for test imports.
 
A detailed error might be logged in the Admin CP of XF:

Admin CP -> Tools -> Server Error Log

After I run the Import.php
mysql -hlocalhost testdb -uforum_usercp -pjPMHAl -N -q -e " DELETE FROM xf_user_external_auth WHERE user_id > 1 OR provider = 'facebook'; REPAIR TABLE xf_user_external_auth;xf_user_privacyERROR 2 (HY000) at line 1: File '/app/apache/forum/xenbig/importdataxf_user_privacy.txt' not found (Errcode: 2)
(0.01s)...
which throws the above error. I can't log back in to the Admin CP.
 
Top Bottom