MyBB 1.2.x ---> phpBB2.0.22 convertor

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.
Mr.TAEL
Registered User
Posts: 12
Joined: Tue Apr 15, 2008 9:48 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

DB Encoding is UTF-8 . (It's in Persian Language)

I'll send you new dumps .

Also phpbb_posts_text, phpbb_posts and phpbb_topics table are regular and correct . (they have'nt any problems and they're very good !)

Thanks .
todespudel
Registered User
Posts: 37
Joined: Fri Oct 05, 2007 4:15 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

Still waiting for the dumps
Mr.TAEL
Registered User
Posts: 12
Joined: Tue Apr 15, 2008 9:48 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

todespudel wrote:Still waiting for the dumps

Cheers .
todespudel
Registered User
Posts: 37
Joined: Fri Oct 05, 2007 4:15 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

lol...ok...
I don't even know my own dump requirements anymore - sorry for that.

As stated in the first post, the dump must look like this:

Code: Select all

INSERT INTO mybb_tablename VALUES (value1, ...., valueN);
Your dump uses "complete inserts", but you must not use complete nor extended inserts! Sorry about that, my fault. I adjusted your dump extract and it worked fine for me (although I wasted 3 hours of my life because of a bug of my text editor which had displayed the dump incorrectly...argh).

So please try to make a new dump and run the converter again. I really hope that it going to work this time... (sadly, you have to run the whole converter again. I cannot implement a partly conversion because of some design mistakes.)
Mr.TAEL
Registered User
Posts: 12
Joined: Tue Apr 15, 2008 9:48 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

Can you please step by step (with full details) explain for me , How can i convert this database ?

Thanks and sorry for bothering you .
todespudel
Registered User
Posts: 37
Joined: Fri Oct 05, 2007 4:15 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

Ok, so here is a revised version of the first post. If you have questions for a specific step, please ask. It is not an "easy" converter, it is more like a "works for me" thing, although I try to provide support :
0.) Create a new directory on your hard disk where you save all files related to this conversion.
1.) Make a DB dump. You MUST NOT use complete nor extended inserts!
phpymyadmin: select your db, click export, select the mybb tables, tick structure, tick 'simple quotes for table and field names' (or sth like that - again: I don't use the english version, sry), tick data, untick "extended inserts", untick "complete inserts", tick "send", click ok and save the file to your 'conversion' directory.
In the created dump file, the "INSERT INTO" lines should look like this:

Code: Select all

INSERT INTO table_name VALUES (value1, ..., valueN);
(which means NO extended inserts, NO complete inserts: one line, one value bracket - there are lines that look different from that, of course (all the 'create table' for example).
3.) Open the script with some editor and adjust the settings (line 24: adjust mybb_prefix, line25: phpbb_prefix, line31: conversion_path (the path where your dump and the script are located - again, both should be in the SAME directory, line 35: sql_dump, the name of the db dump which you have made).
4.) Linux: run the script
Open the command line and browse to the directory (I don't remember the exact command for browsing windows directories: google for 'cd' for the exact syntax) where you have installed Python. Start the script:

Code: Select all
python c:\\\\path\\\\to\\\\script_file\\\\script.py

5.) Make a clean (which means NO mods) phpBB 2.0.22 installation (on your server).
6.) Use bigdump.php or sth. else to import the created database file (phpbb2.sql) to your phpbb2 database (on your server).
7.) If you want to stay with phpbb2: see the next post. Edit login.php.
If you want to upgrade to phpbb3: run the phpbb3 update script and see post #5 for further information.
8.) Delete the whole conversion directory (save the converted dump, if you like).

BTW, I'm on holidays until monday.
Mr.TAEL
Registered User
Posts: 12
Joined: Tue Apr 15, 2008 9:48 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

Finally I converted that successfully . But now I have another problem . My converted DB is not UTF-8 & all characters shows like this : ???? ? ???? ????

Now how can I repair that ?

Thanks.
ninhanh
Registered User
Posts: 47
Joined: Sun Mar 30, 2008 4:27 am
Location: Viet Nam
Contact:

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

todespudel
Registered User
Posts: 37
Joined: Fri Oct 05, 2007 4:15 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

Mr.TAEL wrote:Finally I converted that successfully . But now I have another problem . My converted DB is not UTF-8 & all characters shows like this : ???? ? ???? ????

Now how can I repair that ?

Thanks.
Back again.

It is not UTF-8? Strange - I am going to have a look at this, later this day
Can you please open the converted dump and check if the characters are displayed correctly (no ????). I suspect that this somehow happens after processing the dump to the DB again.
todespudel
Registered User
Posts: 37
Joined: Fri Oct 05, 2007 4:15 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

Ok, this is most likely because of the database tables created "incorrectly" during the standard phpbb2 installation. Please check in phpmyadmin the collation of your tables (select the database, select for example phpbb_forums, and look at the collation column - they are most likely NOT utf-8!).

Well, you could change the collation manually (mark a table, click show and edit the collation ofevery column which already has a collation assigned, change it to utf_8_persian_ci) , but I guess that there is a way to do that automatically. I will figure that out later/tomorrow, sorry, but I have not enough time right now
Mr.TAEL
Registered User
Posts: 12
Joined: Tue Apr 15, 2008 9:48 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

todespudel wrote:Ok, this is most likely because of the database tables created "incorrectly" during the standard phpbb2 installation. Please check in phpmyadmin the collation of your tables (select the database, select for example phpbb_forums, and look at the collation column - they are most likely NOT utf-8!).

Well, you could change the collation manually (mark a table, click show and edit the collation ofevery column which already has a collation assigned, change it to utf_8_persian_ci) , but I guess that there is a way to do that automatically. I will figure that out later/tomorrow, sorry, but I have not enough time right now
I've changed collation but characters are still ??? ????? like . I think converted DB is not UTF-8 .

todespudel
Registered User
Posts: 37
Joined: Fri Oct 05, 2007 4:15 pm

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

Have you opened the converted dump and checked it? I really doubt, that the persian characters are replaced by ??? in the converted dump.

Characters remain ???? in the DB, you must at least upload the dump again.
ninhanh
Registered User
Posts: 47
Joined: Sun Mar 30, 2008 4:27 am
Location: Viet Nam
Contact:

Re: MyBB 1.2.x ---> phpBB2.0.22 convertor

http://todespudel.to.ohost.de/mybb12x_p ... nvertor.py

Code: Select all

Forbidden

You don't have permission to access /mybb12x_phpbb2_convertor.py on this server.

todespudel
Registered User
Posts: 37
Joined: Fri Oct 05, 2007 4:15 pm

Uh?