Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2012-01-20 07:37:36

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Official converter - testing

Can you try official converter? It's still under development (so might occur minor issues)

Download (zip archive)

Supported forums:

  • Invision Power Board 3.2

  • MyBB 1

  • PHP Fusion 7

  • PhpBB 3.0

  • SMF 1.1

  • SMF 2

  • vBulletin 4.1

Notes:

  • All FluxBB tables are dumped.

  • MAKE BACKUP BEFORE USING THIS CONVERTER!

  • The passwords in some forums are NOT converted due to differences in password storing between the forums.

Installation instructions

  1. Install FluxBB on the server (example: "www.example.com/fluxbb/").

  2. Create a subdirectory in the FluxBB directory (example name: "converter").

  3. Put all files from the converter zipfile in that directory.

  4. Go to the converter page ("www.example.com/fluxbb/converter/").

  5. Choose which forum software you want to convert from.

  6. Enter database connection information

  7. Press 'Start converter'.

  8. When the converter is done, remove the converter files.

  9. Done! You're now ready to use FluxBB!

Running from command line

php converter.php -f forum_name -t old_db_type -s old_db_host -n old_db_name -u old_db_username -p old_db_password -r old_db_prefix -c old_db_charset

Type: "php converter.php --help" to see available parameters

When something goes wrong, submit new ticket and attach the log file (file cache/converter_*.log)

This topic was splitted from the FluxBB migration tool topic.

Last edited by daris (2012-08-29 11:47:45)

Offline

#2 2012-01-20 17:14:25

leonardo
Member
Registered: 2012-01-19
Posts: 7

Re: Official converter - testing

daris,
It's giving an error:

Fatal error: Call to a member function end_transaction() on a non-object in /path/to/forum/conv2/include/forum.class.php on line 70

I'm filling all the fields for the import.
The database is in another server, just in case you need to know.

The funcion seems to be:

        function close_database()
        {
                $this->db->end_transaction();
                $this->db->close();
        }

Offline

#3 2012-01-20 19:02:03

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

Eh, the $db object was not initialized - probably due to wrong database configuration wink (fixed fatal error message, don't need your log now tongue )

Offline

#4 2012-01-20 19:03:19

leonardo
Member
Registered: 2012-01-19
Posts: 7

Re: Official converter - testing

Oh great, I was uploading it to the ticket.

Did you already commit changes? Should I redonwload and try again?

Offline

#5 2012-01-20 19:03:58

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

Yes, commited smile

Offline

#6 2012-01-20 19:39:17

leonardo
Member
Registered: 2012-01-19
Posts: 7

Re: Official converter - testing

Another error:

An error was encountered
File: /path/to/forum/oficial-converter/include/dblayer/mysqli.php
Line: 49

FluxBB reported: Unable to connect to MySQL and select database. MySQL reported: Access denied for user 'user'@'mysql.host' (using password: NO)

It seems it's not sending the authentication for the database.

Note: Replaced path, user and mysql.host for privacy.

Offline

#7 2012-01-21 07:51:36

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

Are you sure the connection details are correct and you have permissions to connect database? (maybe it allows for localhost only)

edit: never mind, I mistyped password field name in index.php tongue
Fixed. You can download again converter package or manually do the changes from that commit wink

Offline

#8 2012-01-21 16:22:14

JoshJosh
Member
Registered: 2011-09-19
Posts: 17

Re: Official converter - testing

Error: You have to enter database type for old forum..

Even though I entered the database type (mysql).

Offline

#9 2012-01-22 00:14:35

leonardo
Member
Registered: 2012-01-19
Posts: 7

Re: Official converter - testing

Hi daris, found another error:

An error was encountered
File: /path/to/forum/convertir-oficial/include/fluxbb.class.php
Line: 73

FluxBB reported: Unable to insert values 

Database reported: Duplicate entry '4016-5370' for key 'PRIMARY' (Errno: 1062) 

Failed query: INSERT INTO tp_topic_subscriptions (user_id, topic_id) VALUES('4016', '5370')

where tp = table prefix for the FluxBB forum.

need the log?

Offline

#10 2012-01-22 07:14:48

leonardo
Member
Registered: 2012-01-19
Posts: 7

Re: Official converter - testing

I did some more debugging, couldn't fix it yet, but found the following:

the table from where the error seems to come is phpbb_topics_posted or phpbb_topics_track or phpbb_topics_watch those contain both fields.

Usually the topic_id is repeated along several users, as they answered in such topic or are following it.

Seems to be some kind of conflict with the subscription feature of fluxbb so, i'm guessing its the watch phpbb table.

Hope this helps!

ps. If i visit fluxbb, I can see almost everything working, forums, posts and users. But the reported users at the bottom right is "1" (one). So, we are almost there wink

Offline

#11 2012-01-22 08:14:24

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

need the log?

Not this time smile

It's the topics_watch table. The easiest solution is adding DISTINCT to prevent selecting duplicate rows - fixed.

ps. If i visit fluxbb, I can see almost everything working, forums, posts and users. But the reported users at the bottom right is "1" (one). So, we are almost there

I thought users are converted after subscriptions (look at the userlist page - is it showing something? tongue )

Offline

#12 2012-01-22 08:34:07

leonardo
Member
Registered: 2012-01-19
Posts: 7

Re: Official converter - testing

Great, everything seems to be OK now!

I thought users are converted after subscriptions (look at the userlist page - is it showing something?  smile

Yeah! I figured that after posting... the thing is, everything in the index "looks normal", forums, last posts, and user names... but, once you try to see something, there was nothing smile

Thanks for the patience!

Offline

#13 2012-01-22 23:17:18

JoshJosh
Member
Registered: 2011-09-19
Posts: 17

Re: Official converter - testing

JoshJosh wrote:

Error: You have to enter database type for old forum..

Even though I entered the database type (mysql).

This time it worked, but it only brought over 35 out of 424 threads, as well as not all of the users. All forums and categories were transferred. Let me know if you need a log.

Edit: Pretty sure this is caused after updating the database which is required after running the converter.

Last edited by JoshJosh (2012-01-22 23:55:05)

Offline

#14 2012-01-23 07:19:58

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

JoshJosh wrote:

This time it worked

I made a small mistake in some of the previous commits smile (and fixed it later)

What forum software did you convert from?

Offline

#15 2012-01-23 16:27:31

JoshJosh
Member
Registered: 2011-09-19
Posts: 17

Re: Official converter - testing

MyBB

Offline

#16 2012-01-23 18:33:53

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

The upgrade request was probably due to the old FluxBB 1.4.7 version defined. Fixed

Offline

#17 2012-01-23 21:43:52

JoshJosh
Member
Registered: 2011-09-19
Posts: 17

Re: Official converter - testing

This time there's another problem. The number of posts/threads shown from the index for each forum is correct, but after clicking on the individual forums, most threads are missing. Many forums are simply empty.

Offline

#18 2012-01-24 11:54:17

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

Is it possible to get your database dump? (if yes, you can send it by email). It's easier to fix issues that you know how to reproduce.

edit: can you update converter and run again?

Offline

#19 2012-01-28 03:22:54

JoshJosh
Member
Registered: 2011-09-19
Posts: 17

Re: Official converter - testing

daris wrote:

Is it possible to get your database dump? (if yes, you can send it by email). It's easier to fix issues that you know how to reproduce.

edit: can you update converter and run again?

As far as I can tell, it worked perfectly this time. Thanks!

Offline

#20 2012-02-18 12:56:02

unikum
Member
From: Russia
Registered: 2012-02-18
Posts: 4
Website

Re: Official converter - testing

Hi, thanks for this tool.
I encountered a problem with convert user nicknames in Russian. Converter recieve letter "е" and "ё" as one letter. I tried convert phpbb3 to fluxbb 1.4.8.
Error output:

File: /srv/http/forum/converter/include/fluxbb.class.php
Line: 135

FluxBB reported: Unable to insert values

Database reported: Duplicate entry 'Алена' for key 'forum_users_username_idx' (Errno: 1062)

Failed query: INSERT INTO forum_users (id, group_id, username, password, url, icq, msn, aim, yahoo, num_posts, location, email_setting, timezone, registered, last_visit, signature, email) VALUES('158', '4', 'Алена', 'pass', '', '', '', '', '', '3', '', '', '3.00', '1269778285', '1270310468', '', 'xxxxxx@xxx') 

And another: may be necessary to add convert user_ip to registration_ip values?

Last edited by unikum (2012-02-18 13:10:57)

Offline

#21 2012-02-18 14:37:39

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

Can you submit a bug report?

Well, the only possible solution for this would be renaming users when converting, just like it's done when upgrading fluxbb 1.2 to 1.4. More details: http://fluxbb.org/development/core/tickets/60/

Offline

#22 2012-02-18 15:17:18

Visman
Member
From: Siberia
Registered: 2010-07-10
Posts: 1,391
Website

Re: Official converter - testing

@unikum,  если конвертируешь с виндовской кодировки (cp1251), то попробуй изменить в файле functions.php код

	if ($old_charset != 'UTF-8' && !seems_utf8($str))
	{
		if (function_exists('iconv'))
			$str = iconv($old_charset == 'ISO-8859-1' ? 'WINDOWS-1252' : 'ISO-8859-1', 'UTF-8', $str);
		else if (function_exists('mb_convert_encoding'))
			$str = mb_convert_encoding($str, 'UTF-8', $old_charset == 'ISO-8859-1' ? 'WINDOWS-1252' : 'ISO-8859-1');
		else if ($old_charset == 'ISO-8859-1')
			$str = utf8_encode($str);
	}

-->

	if ($old_charset != 'UTF-8' && !seems_utf8($str))
	{
		if (function_exists('iconv') && strpos($old_charset, '1251') !== false)
			$str = iconv('CP1251', 'UTF-8//IGNORE//TRANSLIT', $str);
		else if (function_exists('mb_convert_encoding') && strpos($old_charset, '1251') !== false)
			$str = mb_convert_encoding($str, 'UTF-8', 'CP1251');
		else if (function_exists('iconv'))
			$str = iconv($old_charset == 'ISO-8859-1' ? 'WINDOWS-1252' : 'ISO-8859-1', 'UTF-8', $str);
		else if (function_exists('mb_convert_encoding'))
			$str = mb_convert_encoding($str, 'UTF-8', $old_charset == 'ISO-8859-1' ? 'WINDOWS-1252' : 'ISO-8859-1');
		else if ($old_charset == 'ISO-8859-1')
			$str = utf8_encode($str);
	}

И укажи старую кодировку как CP1251

Offline

#23 2012-02-18 15:58:00

unikum
Member
From: Russia
Registered: 2012-02-18
Posts: 4
Website

Re: Official converter - testing

2daris, as workgroung I manually renamed a users in phpbb user table which produce this issue.

2Visman, все базы исключительно в utf-8. Но как вариант можно сконвертировать phpbb базу в cp1251 (там таких проблем насколько я понял нет), а из неё уже в utf-8. Буду пробовать ещё.

UPD: according this table these letters is equivalent in utf8_unicode_ci. Seems it's feature - http://bugs.mysql.com/bug.php?id=34096. Convert user table in utf8_bin is solve problem, but with some problems (letters register).

Last edited by unikum (2012-02-18 16:33:32)

Offline

#24 2012-02-19 09:55:56

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

I created a ticket and then fixed above error. When user with similar username is found (for example: töma), the number is added at the end of username (töma1). When converter finishes, it allows you to notify users about username change by email.

Offline

#25 2012-02-19 10:27:50

daris
Developer
From: Poland
Registered: 2008-05-09
Posts: 557

Re: Official converter - testing

Should the converter support PHP 4 ? (currently it doesn't)

Offline

Board footer

Powered by FluxBB