[SUPPORT] vBulletin 3.0.x to phpBB

This is an archive of the phpBB 2.0.x convertors forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
dcolanduno
Registered User
Posts: 3
Joined: Mon Jan 08, 2007 4:31 pm
Location: Roswell, GA
Contact:

Post by dcolanduno » Tue Jan 09, 2007 5:47 pm

Thanks for the tip...

I put in a service request to vBulletin and I'll see what they say. But, they have a nice tool to convert from phpBB over... the issue I have had is that fact that the phpBB dumps are so big. I think this tool might be the ticket!

THANKS!
Derek Colanduno
Host - Skepticality
http://www.skepticality.com/

Nosforit
Registered User
Posts: 1
Joined: Wed Jan 24, 2007 3:34 pm

Post by Nosforit » Wed Jan 24, 2007 4:24 pm

I'm rather confused about how to import my tables from vBulletin. If I created a database called "phpbb" when installing phpBB2, should I import the tables from vB directly into this database?

My SQL dump is over 200MB large, so I imported it directly using the command line. It re-created its old database. Can I somehow move the tables over to the DB called "phpbb"?

None of my vB tables have a prefix. Can I somehow append one to all the tables? For some reason, v4a of the converter has the default prefix empty in its conf.php, but it's not finding my tables anyway when running the first step in the script. (And I don't see why it should be poking around outside the DB called "phpbb" to begin with...)

Help please. :(

ED:
The vB DB is 3.6.0, and my webserver is the latest version of the XAMPP distribution running locally on Windows XP.


ED2:
To answer my own questions,

Yes, I need to import the vB dump into the DB "phpbb".

I can do so under the Operations tab in phpMyAdmin. I use "Copy database to:", entering "phpbb" in the field and deselecting "CREATE TABLE..."
The operation timed out right after transferring the 200 000 posts, so I dropped the tables already copied from the vB DB and did the transfer again.

There seems to be no need to use a prefix.

jerx
Registered User
Posts: 167
Joined: Fri Sep 02, 2005 4:27 am

additional userfields

Post by jerx » Sat Feb 03, 2007 2:21 pm

I need to convert additional userfields. Does anyone know how to extend the convertor? I think you need to edit conv_user.php.

My additional user fields are named field5, field6, field7, ..., field25.

Thanks in advance for your help!

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: additional userfields

Post by D¡cky » Sun Feb 04, 2007 5:03 am

jerx wrote: I need to convert additional userfields. Does anyone know how to extend the convertor? I think you need to edit conv_user.php.

My additional user fields are named field5, field6, field7, ..., field25.

Thanks in advance for your help!

Yes, you will have to edit conv_user.php
Have you hugged someone today?

jerx
Registered User
Posts: 167
Joined: Fri Sep 02, 2005 4:27 am

Post by jerx » Mon Feb 05, 2007 11:57 pm

Ok, I managed to convert my additional fields. But there are two standard vbulletin fields, which I need help with:
1. Avatar
2. Birthday

1. The avatar is stored in the database by default. I think it is easier to import them if you change this to file system in the admin control panel. Vbulletin extracts the pictures of the database and puts the files in customavatar folder. They are renamed to avatar1_3.gif, where the first number is the userid and the second number is the avatar revision number (increases on every avatar change). New avatars which are stored after switching from database to file system, are also renamed according to this scheme. The revision number is stored in the users table in a field called avatarrevision (int(10)).

The avatar is stored in a seperate table called vb3_customavatar. It stores these values:
userid, filedata, dateline, filename, visible, filesize, width, height and importcustomavatarid.
I think that only the userid is important. Users without an avatar are not listed in this table.

So, in order to import the avatars into phpbb, you need to merge two fields of the database on different tables and add some constant characters:
avatar1_3.gif
= avatar(userid)_(avatarrevision).gif

A problem I see here is that the vb3_customavatar (for retrieving userid) table does not have as many rows as the vb3_user table (avatarrevision).

2. The birthday is stored in the users table in a field called birthday (varchar(10)). If your birthday is on 5th February 1977, it will be stored like this:
02-05-1977
= month-day-year

Terrafrost' s birthdays hack stores in the phpbb_users table in a field called user_birthday (int(8)). The above birthday would be stored like this:
2051977
= monthdayyear

So, here you need to delete the minus'. I think it does not matter that some vbulletin dates do have an additional 0 at the beginning, because it will be ignored.

Can you please help me to import these two fields? I don' t know how to call the values from the database and how to create the new values.

PS:
For anyone who is interested in importing his additional userfields:
#
#-----[ SQL ]-------------------------------------------
#
ALTER TABLE phpbb_users ADD user_field5 VARCHAR(255);
#
#-----[ OPEN ]------------------------------------------
#
conv_user.php
#
#-----[ FIND ]------------------------------------------
# this is a partial match
#
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, user_active, username, user_password,
#
#-----[ IN-LINE FIND ]----------------------------------
#
) VALUES
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------
#
user_field5,
#
#-----[ IN-LINE FIND ]----------------------------------
#
)";
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------
#
, ''
#
#-----[ FIND ]------------------------------------------
#

$user_yahoo = (eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $users_data[$i]['yahoo'])) ? $users_data[$i]['yahoo'] : '';
$user_aim = (eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $users_data[$i]['aim'])) ? $users_data[$i]['aim'] : '';
$user_msn = (eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $users_data[$i]['msn'])) ? $users_data[$i]['msn'] : '';
$user_icq= (preg_match("/^[0-9]+$/", $users_data[$i]['icq'])) ? $users_data[$i]['icq'] : '';
#
#-----[ BEFORE, ADD ]-----------------------------------
# do not rename the second field5 instance (['field5']) in this code. The first one ($field5 =) can be renamed).
#

$field5 = addslashes($users_data[$i]['field5']);

#
#-----[ FIND ]------------------------------------------
# this is a partial match
#
$sql = "INSERT IGNORE INTO " . USERS_TABLE . " (user_id, user_active, username, user_password,
#
#-----[ IN-LINE FIND ]----------------------------------
#
)
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------
#
user_field5
#
#-----[ FIND ]------------------------------------------
# this is a partial match
#
$user_yahoo . "', '" . $user_msn . "', '" . $occupation . "', '" . $interests . "', '" . $salt_data . "',
#
#-----[ IN-LINE FIND ]----------------------------------
#
)";
#
#-----[ IN-LINE BEFORE, ADD ]----------------------------
#
'" . $field5 . "'


If you have more than one additional field, you need to do this for every additional field. You can also rename field5 to a more meaningful name. There is only one instance which you are not allowed to rename. I have marked that code above. So the line needs to read like this:

Code: Select all

$meaningfulname = addslashes($users_data[$i]['field5']);
If your field does only contain numbers, you need to change it to

Code: Select all

$meaningfulname = ($users_data[$i]['field5']);
Moreover you need to change

Code: Select all

, ''
to

Code: Select all

0
(second code addition).

jerx
Registered User
Posts: 167
Joined: Fri Sep 02, 2005 4:27 am

Post by jerx » Tue Feb 06, 2007 12:31 pm

I have managed to import the birthdays.

You need to follow my above instructions and write birthday instead of field5. And this part needs to be replaced:

Code: Select all

$birthday = ($users_data[$i]['field5']);
with this code:

Code: Select all

				$bday_month = substr( $users_data[$i]['birthday'], 0,2);
				$bday_day = substr( $users_data[$i]['birthday'], 3,2);
				$bday_year = substr( $users_data[$i]['birthday'], 6,4);
				$birthday = sprintf('%02d%02d%04d',$bday_month,$bday_day,$bday_year);
I am still clueless about the avatar import. The problem is that they are stored in a different table and that there are less rows.

I will keep on trying, but any help is greatly appreciated.

PS I cannot guarantee that my code is working. I have only very limited knowledge, but it looks like all fields besides avatars have been imported successfully.

Xanthrop
Registered User
Posts: 53
Joined: Wed Nov 13, 2002 6:29 am

Post by Xanthrop » Mon Feb 12, 2007 8:03 pm

Dicky,

On Step 4 - Post Converstion (1/2), I have 33,802 Posts to Convert and it runs to 8500 and 9000 posts and then just stops. I try click on Step 4 to start it over and it will clear out the posts and reimport the first 8500-9000 again and just stop every time. Do I need to bump a timeout or some other variable up to get all 33,802 posts imported?

Thanks,
Xanthrop
-- Xanthrop Zin

jerx
Registered User
Posts: 167
Joined: Fri Sep 02, 2005 4:27 am

Post by jerx » Mon Feb 12, 2007 8:50 pm

You need to inscrease the "max_execution_time" in your php.ini. The file is located in apache directory, if you are using easyphp. I think setting it to 200 should be sufficient.

Xanthrop
Registered User
Posts: 53
Joined: Wed Nov 13, 2002 6:29 am

Post by Xanthrop » Tue Feb 13, 2007 1:06 am

jerx wrote: You need to inscrease the "max_execution_time" in your php.ini. The file is located in apache directory, if you are using easyphp. I think setting it to 200 should be sufficient.


I modified my php.ini file such that max_execution_time = 200

However, the page conversion.php finishes loaded at 8500 or 9000, never beyond 9000. The page loading is Done. Same results in Firefox or IE. I'm not sure it's a php side issue because the conversion.php page can reach 9000 posts in probably 20sec, then it's done with the page and nothing else happens.

Let me know if you can think of any other variables.

Thanks,
Xanthrop

edit: in conv_posts.php, I modified:
$posts_default=500;
to be
$posts_default=34000;

After about 20sec or so, it comes back saying it processed 34000 OK, but when I look at the table in the db, it only says about 7500, if I run it again, it clears the table and loads the first 7500 or so.

I run IIS 6.0 and I know pages load longer than 20sec so I doubt that IIS is timing it out. And I know mysqldumps to back up the 52MB database take around 1 minute so I doubt the database engine is cutting the queries short...
-- Xanthrop Zin

jerx
Registered User
Posts: 167
Joined: Fri Sep 02, 2005 4:27 am

Post by jerx » Tue Feb 13, 2007 4:47 am

I think that longer page generation times or downloads of datase backups do not indicate that the maximum execution time is sufficient. But it does not look you have that problem. You would have received an error message (max execution time exceeded or similar).

Are you using the server on your local pc? I think I have read that the convertor does only work on your local machine. You might need apache and mysql as well.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Post by D¡cky » Tue Feb 13, 2007 4:05 pm

It is not absolutely necessary to run the conversion locally. It does sometimes work better locally and you do have control over the server settings if needed.

Try opening conv_posts_text.php and put @set_time_limit(0); after require_once('./language.php');

The convertor does sometimes stall on very large posts. One workaround is after the convertor stalls, check to see what the last post converted is and then modify conv_posts_text.php to not empty the table and have it start at the next post.
Another workaround is, if it stops at the same post every time, you could delete the text from that post and reinsert the text after the conversion.
Have you hugged someone today?

Xanthrop
Registered User
Posts: 53
Joined: Wed Nov 13, 2002 6:29 am

Post by Xanthrop » Tue Feb 13, 2007 5:40 pm

D¡cky wrote: Try opening conv_posts_text.php and put @set_time_limit(0); after require_once('./language.php');


Thank you! That worked!

Xanthrop
-- Xanthrop Zin

razvan_ct
Registered User
Posts: 3
Joined: Thu Apr 12, 2007 11:28 am

Re: [SUPPORT] vBulletin 3.0.x to phpBB

Post by razvan_ct » Thu Apr 12, 2007 11:44 am

Hi guys,

I have this problem which probably is the cause of all other problems for my conversion. When i convert posts i receive this error (see the pic).
vbtophpbb.JPG
vbtophpbb.JPG (153.62 KiB) Viewed 671 times
When i enter a forum, i see that the last post is the same for 40% of the threads. if i want to post , it gives me the same error : that i can't post because is duplicate entry like in the pic.

Before someone gives me the indication to look if post_id is AUTOINCREMENT , i'm telling you that it is. The post_id is MEDIUM INT(8) .. if i change it to BIG INT then the conversion doesn't give me errors anymore, but i see that "40% posts as the same post" without name of poster and the date is 1.01.1970. Also i can post, but after i submit the post, the thread dissappears. So i'm thinking that the solution is not to make post_id BIG INT. Can anybody help me please?

PS: The vb version is 3.6.4

Thank you

razvan_ct
Registered User
Posts: 3
Joined: Thu Apr 12, 2007 11:28 am

Re: [SUPPORT] vBulletin 3.0.x to phpBB

Post by razvan_ct » Sat Apr 14, 2007 5:32 pm

No one can help me??? :(

Seeker
Registered User
Posts: 31
Joined: Thu Dec 06, 2001 10:56 pm
Contact:

Re: [SUPPORT] vBulletin 3.0.x to phpBB

Post by Seeker » Sun Apr 15, 2007 2:54 pm

I have run a test conversion and all went ok but I have a couple questions.

1) Must you convert everything? All I want is my user accounts.
2) After converting I ended up with only 2 user groups admin and user where on VB I have 5. 3 of which I must try to maintain. Admin User and VIP. How do I manage this?

Thanks in advance for any help and advice.

Regards,
Peter

Locked

Return to “[2.0.x] Convertors”