Resource icon

vBulletin 5 to Xenforo Importer 1.1.414.1

No permission to download
OK, I have downloaded and installed a fresh new copy of Xenforo v1.5.16a, and it passes the file health check. I attempted to run your script and got the following errors. I do see the Autoloader.php in the correct place...

[Wed Jan 24 16:04:15.130469 2018] [proxy_fcgi:error] [pid 12472] [client 127.0.0.1:41860] AH01071: Got error 'PHP message: PHP Warning: require_once(/home/137258.cloudwaysapps.com/scbuekeedq/public_html/'/home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum/library/XenForo/Autoloader.php): failed to open stream: No such file or directory in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 134\nPHP message: PHP Fatal error: require_once(): Failed opening required '/home/137258.cloudwaysapps.com/scbuekeedq/public_html/'/home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum/library/XenForo/Autoloader.php' (include_path='.:/usr/share/php') in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 134\n'
 

Attachments

  • Screen Shot 2018-01-24 at 10.09.12 AM (2).webp
    Screen Shot 2018-01-24 at 10.09.12 AM (2).webp
    53.9 KB · Views: 7
/home/137258.cloudwaysapps.com/scbuekeedq/public_html/'/home/94079.cloudwaysapps.com
Do you see the /'/ Thats wrong something isn't right.
You also shouldn't have 2 home folders.

define('XF_ROOT) should look something like this
define('XF_ROOT', $_SERVER['DOCUMENT_ROOT']."/forum");
Where forum is the name of the folder you have your forums in. Looks like for you its forum so you can leave that.
define('VB_ROOT') should look like this
define('VB_ROOT', $_SERVER['DOCUMENT_ROOT']."/forum_vb5");
where forum_vb5 is the directory of your vb forums.
 
I can't figure out why that path is being generated. I have not entered it anywhere in my settings. Here is the top config section of your/my php file:

<?php
// Start Config Section
if (!isset($_SESSION)){ session_start();} // Open Session
ob_start(); //Start Objects
echo "<meta charset='utf-8'/>";

$startTime = microtime(true);
define('XF_ROOT', $_SERVER['DOCUMENT_ROOT']."'/home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum"); // Xenforo root set this (absolute path)!
define('XF_I_ATTACH', "/internal_data/attachments/"); // Xenforo Attachment Folder - This is the default, but if you've moved it, change this to it. (Keep trailing slash)
define('XF_ATTACH', "/data/attachments/"); // Xenforo Attachment Folder - This is the default, but if you've moved it, change this to it. (Keep trailing slash)
define('XF_SMILIE_DIRECTORY', XF_ROOT."/data/smilies/"); // Xenforo Smilie Folder - (Keep trailing slash) What ever folder you use make sure its chmod 777 (This must exist already)(absolute path)!

define('VB_ROOT', $_SERVER['DOCUMENT_ROOT']."'/home/94079.cloudwaysapps.com/pbwkudjcwh/public_html/forum"); // VB5 root set this (absolute path)!
/*
Code will try to use the smiliepath provided by VB database, but wasn't correct for all installs Copying all your smilies to this folder will insure all is moved.
Code will only move the file names it finds. Make sure the files exist in the below folder. Won't find it in a subfolder.
*/
define('VB_SMILIE_DIRECTORY', VB_ROOT."/images/smilies/"); // VB5 Smilie Directory (Keep trailing slash)
define('VB_ATTACH', "/images/attachments/"); // VB5 Attachment Folder - This is the default, but if you've moved it, change this to it. (Keep trailing slash)

define('TIMENOW', time());
define('SESSION_BYPASS', false); // if true: logged in user info and sessions are not needed
//XF Database Connection
define('XF_DB_IP', '45.56.127.60');
define('XF_DB_USER', 'scbuekeedq');
define('XF_DB_PASS', 'TxR8q7a3XP');
define('XF_DB_NAME', 'scbuekeedq');
//VB5 Database Connection

define('VB_DB_IP', '45.56.127.60');
define('VB_DB_USER', 'pbwkudjcwh');
define('VB_DB_PASS', 'zHT7dJahPd');
define('VB_DB_NAME', 'pbwkudjcwh');
 
Exactly as I said before.
'XF_ROOT' is set
define('XF_ROOT', $_SERVER['DOCUMENT_ROOT']."'/home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum");
The above ="/home/137258.cloudwaysapps.com/scbuekeedq/public_html/'/home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum"
Notice the /'/ This is because the server is getting the root directory already from the variable $_SERVER['DOCUMENT_ROOT']
You need to change it to just
define('XF_ROOT', "/home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum");
or
define('XF_ROOT', $_SERVER['DOCUMENT_ROOT']."/forum");
Same for the VB one.
define('VB_ROOT', "/home/94079.cloudwaysapps.com/pbwkudjcwh/public_html/forum");

The variable $_SERVER['DOCUMENT_ROOT'] will always = the folder structure to the beginning/root of the website.

And please change your pwd info in the above post even if its temp :). Not everyone is nice and bubbly when they get server info like that.

You need to make sure whatever user you are using to do this. Has access to both those directories. If not. I recommend copying your forum folder from
/home/94079.cloudwaysapps.com/pbwkudjcwh/public_html/forum
And copy it to
/home/94079.cloudwaysapps.com/scbuekeedq/public_html/vb_forum
If you do the above you will need to have
define('VB_ROOT', $_SERVER['DOCUMENT_ROOT']."/vb_forum");
or if you want want direct
define('VB_ROOT', "/home/94079.cloudwaysapps.com/pbwkudjcwh/public_html/vb_forum");

Or you will have issues moving attachments, smilies, etc. The VB forum folder is only needed for attachments really. I recommend keeping the current smilies from Xenforo and just re-add what you want to keep. So if you don't have any attachments or smilies. You really don't need it.

Hope this helps.
 
First, I have changed both site DB Passwords, thanks.
Second, I removed that extra ' that I didn't notice was there before so that my/your PHP file read:
Line 8 : define('XF_ROOT', $_SERVER['DOCUMENT_ROOT']."/home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum");
Line 14: define('VB_ROOT', $_SERVER['DOCUMENT_ROOT']."/home/94079.cloudwaysapps.com/pbwkudjcwh/public_html/forum");
This still delivered a blank page and the error log read:

[Wed Jan 24 20:33:06.445890 2018] [proxy_fcgi:error] [pid 23747] [client 127.0.0.1:52710] AH01071: Got error 'PHP message: PHP Warning: require_once(/home/137258.cloudwaysapps.com/scbuekeedq/public_html//home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum/library/XenForo/Autoloader.php): failed to open stream: No such file or directory in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 134\nPHP message: PHP Fatal error: require_once(): Failed opening required '/home/137258.cloudwaysapps.com/scbuekeedq/public_html//home/94079.cloudwaysapps.com/scbuekeedq/public_html/forum/library/XenForo/Autoloader.php' (include_path='.:/usr/share/php') in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 134\n'

Then I changed the paths to read:
Line 8: define('XF_ROOT', $_SERVER['DOCUMENT_ROOT']."/forum");
Line 14: define('VB_ROOT', $_SERVER['DOCUMENT_ROOT']."/forum");

This delivered, not a blank page, but rather one with the following text display in the browser (also in the error log file):

Warning: mysqli_connect(): (HY000/1045): Access denied for user 'pbwkudjcwh'@'li945-60.members.linode.com' (using password: YES) in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 152

Fatal error: Uncaught Error: Call to a member function query() on boolean in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php:153 Stack trace: #0 {main} thrown in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 153

Unfortunately, I don't know what this means either.

Finally, I do not understand what you mean by using the same user for both directories. I have a master user account for the entire cloud server that I use for SFTP, and both the VB site and the XF site are on it. However, the databases are different and I have entered those access settings in the convert PHP file. Will that work, or do I need to copy the vb forum folder to the XF public_html root and rename it "vb_forum" ??
 
The first one means it cannot connect to the DB. Make sure everything is correct.
define('XF_DB_NAME', 'scbuekeedq');
This is the name of the database. Not the user. This should be something like 'xenforo'
The vb version by default would be 'vBulletin'

The second error happened because it cannot connect to the DB.
 
Found one db password was wrong. Now I see this!
 

Attachments

  • Screen Shot 2018-01-24 at 4.34.48 PM (2).webp
    Screen Shot 2018-01-24 at 4.34.48 PM (2).webp
    42 KB · Views: 8
Not sure what I'm supposed to do on this screen...
 

Attachments

  • Screen Shot 2018-01-24 at 4.37.52 PM (2).webp
    Screen Shot 2018-01-24 at 4.37.52 PM (2).webp
    37.2 KB · Views: 7
That is where you link up existing Xenforo groups. So unregistered/Not logged in is a vBulletin User group.. Which one of the Xenforo usergroups best suits that for you.. If none of them. Create new, If you don't want that user group anymore. Ignore.
Make sense?
 
You wont need the CMS ones or the Channel ones since Xenforo doesn't use that. Or you could keep them and use them for permissions for other Xenforo mods like Xen Porta. Up to you.
 
Hmmm, still not quite sure what to do with the groups. Attached are my VB usergroups.

Also, I clicked on the first 2 "Convert" buttons, and not much happened... cycled back to that same main screen pretty quickly. Is that normal?

I really appreciate the help!
 

Attachments

  • vb-users.webp
    vb-users.webp
    32.3 KB · Views: 7
Yes, You need to convert the usergroups before you can do anything else.
So in the drop down are the xenforo user groups.
On the left. Is your vbulletin user groups.
Since vbulletins usergroups are not in Xenforo. You need to either create them. Or change them to an existing Xenforo usergroup.
Example. The Administrator already exist in xenforo. So for the administrator you would use the drop down to select xenforo's administrator
CMS editor does not exist in Xenforo. So you either want to select create, or ignore.
I suggest ignore since there is nothing in the base Xenforo that really requires you to need one. Same for all the other CMS Usergroups in vBulletin, and the Channel ones.

Selecting ignore, means when you click at the bottom to create everything. It will ignore that usergroup. And when assigning members usergroups. It will ignore that one existing.
 
OK, I went through the drop downs and tried to select the appropriate options. Then I ran the 4th (new) convert button and got these errors:
---------------------------------
Converting members
Clearing old info
Starting Cycle 1 of 25

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Notice: Undefined variable: usergroup_conversion in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 626

Fatal error: Uncaught XenForo_Exception: Please enter a name that is at least 3 characters long. in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/forum/library/XenForo/DataWriter.php:1359 Stack trace: #0 /home/137258.cloudwaysapps.com/scbuekeedq/public_html/forum/library/XenForo/DataWriter.php(1401): XenForo_DataWriter->_haveErrorsPreventSave() #1 /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php(648): XenForo_DataWriter->save() #2 {main} thrown in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/forum/library/XenForo/DataWriter.php on line 1359
 
The Undefined variable is fine. The Fatal Error means you have a user that has less than 3 characters in it. You can go to xenforo admin, Options, and then User Registration. Scroll down. You'll see min 3 max I think default is 20. Change those to the smallest username you have and to the largest username you have. Your other option is to go into vBulletin and remove the user that has 2 or less characters.
 
It seemed to be working for awhile, then it seems to have stopped...
 

Attachments

  • xf-conversion-stopped.webp
    xf-conversion-stopped.webp
    69.1 KB · Views: 6
Yep. You have a username that has @ in it. vBulletin allows all sorts of weird names. Most people blocked that stuff though.
What you can do. Is look for the user that has @ in their username and change it to an uppercase A. When you are done. You can change it back in the xenforo database.
Or leave it and tell people to use A instead of @ when they log in.
 
I was able to export an Excel file of all 6175 VB5 users. I have a range of maybe 20-40 usernames that include special characters such as: _ * ' . - spaces @ & ; # é + ? ! / Do I need to address all of these? Which ones? Can we do the import and just have the script skip over all the ones that are problematic for XF?
 
Necrophyte... just to be sure... I assume at some point the importer also imports all the VB forums, posts, threads, attachments, etc?
 
Yes, once the users are in. You'll have the option to move the forums.
The forums need the members in order to put them in as it needs to know who created them etc. So the user id's need to exist.
The threads need forum ids in order to create the threads so they know what forum they belong too.
You get the rest.

So to skip the users you have with those special characters.
Find the line in the code
Code:
    while ($row = $result->fetch_assoc()){
        $vb_member_groups = explode(",", $row['membergroupids']);
Should be about line 605
Make it
Code:
    while ($row = $result->fetch_assoc()){
        $nope = "@";
        (false === strpbrk($row['username'], $nope)) ? echo "Good<br>" : continue;
        $vb_member_groups = explode(",", $row['membergroupids']);

the $nope variable, all I put was @. Add whatever other characters to that list that may cause you issues.
Characters like _ and . and space, are ok as far as I remember.

This should skip the users with special names.

Once your done everything.
You'll need to go to admin, tools, Rebuild Caches
Look for Rebuild thread information, make sure you click [ ]Rebuild position and post counters
This will take a while. But will fix all posts showing on one page.
 
Last edited:
Top Bottom