vBulletin 4.2.5 to latest phpBB

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
d-fruit
Registered User
Posts: 167
Joined: Tue Apr 21, 2009 3:20 pm
Location: Estonia

vBulletin 4.2.5 to latest phpBB

Post by d-fruit »

Hello, I currently have vBulletin 4.2.5, but I want move from vBulletin 4.2.5 to latest phpBB without losing all posts/users etc, is there any converter that will do that job? Or any ideas?

// edit

Seems there is one converter: viewtopic.php?p=13252438#p13252438
But it's for vBulletin 4.0.x, I wonder if it will work with vBulletin 4.2.5
One idea: I'll try this converter on vBulletin 4.2.5 to phpBB 3.0.11, then upgrade phpBB 3.0.11 to latest phpBB.
User avatar
EA117
Registered User
Posts: 2175
Joined: Wed Aug 15, 2018 3:23 am

Re: vBulletin 4.2.5 to latest phpBB

Post by EA117 »

I don't have any experience with vBulletin or the converter, but just wanted to say that the plan of using the existing converter to update to an older phpBB -- and once successful, update from the older phpBB to the current phpBB -- sounds good. One thing which you may already realize will be necessary for success there is to run with a phpBB 3.0.x-compatible version of PHP like PHP 5.6.x.

At least during the actual conversion, plus during any steps from the phpBB 3.3.0 update process that have you changing settings in the ACP of the phpBB 3.0.x board. Once you're ready to actually hit Step 12 of those update instructions and open the /install page, you can switch to PHP 7.1.x to PHP 7.4.x before doing that, since the phpBB 3.3.0 update and install code is compatible with the later PHP versions. You will not be able to leave PHP set to PHP 5.6.x, because that is outside the supported PHP versions for phpBB 3.3.0.
d-fruit
Registered User
Posts: 167
Joined: Tue Apr 21, 2009 3:20 pm
Location: Estonia

Re: vBulletin 4.2.5 to latest phpBB

Post by d-fruit »

Thank you for reply and mention about PHP version. Fortunately, I have PHP 5.4.16 installed on system, so I can force to use that PHP version during convert process, and then switch back to PHP 7.x.
I'll try convert vBulletin 4.2.5 to phpBB 3.0.11, then upgrade phpBB 3.0.11 to latest.
d-fruit
Registered User
Posts: 167
Joined: Tue Apr 21, 2009 3:20 pm
Location: Estonia

Re: vBulletin 4.2.5 to latest phpBB

Post by d-fruit »

Update: From vBulletin 4.2.5 to phpBB 3.0.11 convert process looks like was successful, but theres something strange.
vBulletin have 8758 posts but phpBB have 8897; threads 1097 vs 1133; and users are same. No idea why, I did resync stats and posts in ACP, still same...
I'll try upgrade phpBB 3.0.11 to latest. One more thing - my user ID is not 1, but last ID. Is somehow possible to change back to ID 1 safely? First ID was admin user that was created during default phpBB 3.0.11 install, but doesn't exist.
User avatar
EA117
Registered User
Posts: 2175
Joined: Wed Aug 15, 2018 3:23 am

Re: vBulletin 4.2.5 to latest phpBB

Post by EA117 »

d-fruit wrote: Sun May 03, 2020 2:24 pm Update: From vBulletin 4.2.5 to phpBB 3.0.11 convert process looks like was successful, but theres something strange.
vBulletin have 8758 posts but phpBB have 8897; threads 1097 vs 1133; and users are same. No idea why, I did resync stats and posts in ACP, still same...
Be sure and try the "resync" option/icon that exist per-form in the phpBB ACP Forums tab, too. The resync options on the phpBB ACP General tab do reset some things, but are not traversing into and re-calculating each forum.

The premise also includes that it's not vBulletin's post count which actually needed to be recalculated / resync'd. 😜

d-fruit wrote: Sun May 03, 2020 2:24 pm One more thing - my user ID is not 1, but last ID. Is somehow possible to change back to ID 1 safely? First ID was admin user that was created during default phpBB 3.0.11 install, but doesn't exist.
In phpBB, literal user ID 1 is actually the Anonymous/Guest user, and not any kind of actual user or admin. So you're not going to occupy user ID 1 on phpBB, if that's what it's been on vBulletin. User ID 2 is typically the first phpBB admin and "founder" account, although you can have as many admin and founder accounts as you want, and no rule or requirement that user ID 2 "must remain the founder."

So if you're worried about issues because your founder account is actually user ID xxxx, that's not something to worry about. If you have some other reason for wanting to create user ID 2 as a specific user account, it's probably not impossible, but will take some work since user ID 2 presumably already exists and is assigned to one or more posts and/or private messages, etc.

I don't know whether anyone is occupying user ID 2 on your converted board right now or not; I'm just assuming maybe it was occupied by the conversion of users from the vBulletin board. If there isn't any current user ID 2 on the phpBB board, then the same "already assigned to posts and messages" concern applies to your user account and it's current user ID, too, since all those would have to be moved to user ID 2.

So long as your user is marked as being a founder account, I don't think there is anything worth worrying about regarding user IDs.
d-fruit
Registered User
Posts: 167
Joined: Tue Apr 21, 2009 3:20 pm
Location: Estonia

Re: vBulletin 4.2.5 to latest phpBB

Post by d-fruit »

I still didn't like that my user was put as last registered user, so what I did was increment user ID by 100 during convert process.

Open install/convertors/functions_vb4.php file and find:

Code: Select all

/**
* Return correct user id value
* Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well
*/
function phpbb_user_id($user_id)
{
Comment out:

Code: Select all

	if (!empty($config['increment_user_id']) && $user_id == 1)
	{
		return (int) $config['increment_user_id'];
	}
and change:

Code: Select all

return (int) $user_id;
to

Code: Select all

return (int) $user_id + 100;
Then vBulletin user ID 1 will be phpBB user ID 101, and so on... I chose 100 because I've read somewhere that phpBB by default will take user ID 1...53 (including bots).

Thanks EA117 for reply.
User avatar
EA117
Registered User
Posts: 2175
Joined: Wed Aug 15, 2018 3:23 am

Re: vBulletin 4.2.5 to latest phpBB

Post by EA117 »

Thanks for explaining, in case anyone else were to have any similar concern in the future. Yes, changing the IDs during the conversion process itself (rather than in the already-converted board after the fact) is a good idea, and less complicated than what I was referring to.
d-fruit
Registered User
Posts: 167
Joined: Tue Apr 21, 2009 3:20 pm
Location: Estonia

Re: vBulletin 4.2.5 to latest phpBB

Post by d-fruit »

This converter had includes/auth/auth_vb4.php and it worked on phpBB 3.0.11 (it had "auth" folder in /includes folder), I was able to login without resetting password.
But after upgrading to phpBB 3.3, there isn't "auth" folder in /includes folder, does that mean I can't use that anymore on phpBB 3.3? Other users can't login in with same password they had in vBulletin. Only me but I logged in before upgrading phpBB 3.0.11 to phpBB 3.3.
User avatar
EA117
Registered User
Posts: 2175
Joined: Wed Aug 15, 2018 3:23 am

Re: vBulletin 4.2.5 to latest phpBB

Post by EA117 »

Yeah, that makes sense if I had thought about it; unless vBulletin just happened to use exactly the same password hashing scheme as phpBB, there is no way that the passwords could have been converted from vBulletin to phpBB except when the user actually attempts to login to phpBB. (Which is the only time we would have access to the full unhashed password again, in order to hash it using a different method.)

So that probably aligns with why your login works (you logged in while the converter auth method was available) but no one else's does (the converter auth method was gone by the time they tried to login). The vBulletin hash data and "needs to be converted" flags are presumably still there in the phpbb_users table, but we're in need of an auth plug-in that will react to them.

I'm not sure where that auth method code needs to go on a phpBB 3.3.0 board. It will need some more research, and I continue looking at that this evening. Or maybe we'll luck out and someone who already knows will be able to chime in here.
User avatar
EA117
Registered User
Posts: 2175
Joined: Wed Aug 15, 2018 3:23 am

Re: vBulletin 4.2.5 to latest phpBB

Post by EA117 »

EA117 wrote: Mon May 04, 2020 1:49 pm I'm not sure where that auth method code needs to go on a phpBB 3.3.0 board. It will need some more research, and I continue looking at that this evening. Or maybe we'll luck out and someone who already knows will be able to chime in here.
I'm not seeing any precedents we could easily follow to say "how should a converter like vBulletin be handled in phpBB 3.3.0." Its going to take someone who actually knows what was intended to illuminate that further; and that's not me. It seems like we should be able to declare the currently-stored "user_pass_convert = 1" user password hashes as simply a unique vBulletin-specific hash type, and provide a driver for that vBulletin-specific hash type under /phpbb/passwords/driver/.

But that's not the current phpBB 3.0.x-compatible /includes/auth/auth_vb4.php file, nor am I looking in any correct place that shows me an example of how we might expect it should be done for "passwords in an upgraded phpBB 3.0.x database that were still awaiting conversion at the time of upgrade." The phpBB 3.0.x upgrade code in phpBB 3.3.0 seems to give such passwords a $CP$ prefix, which seems to correlate to the existing /phpbb/passwords/driver/convert_password.php driver. But what was expected to happen with them from there just eludes me.

The alternative that comes to mind for trying to move forward without it is to alert board members via an email with a link to the password reset function to gain entry to the new board. But if maintaining the existing vBulletin passwords is more important, then its probably a matter of waiting to hear from someone who actually knows or has done it, or until we find a better example of how to do it ourselves.

Return to “[3.3.x] Convertors”