[Convert] Fail convert SMF2.0RC2 to phpBB3.9

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Anti-Spam Guide
User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by prototech » Wed Jan 30, 2013 2:13 am

That's certainly interesting... The error suggests that the phpbb_user_conv table was dropped between the time that it was filled and right before the ranks table gets filled (which is when username collisions are checked, thus the need to select from the user_conv table). Did you refresh the page by any chance? How many users and attachments does your board have? Can you try running a new conversion to see if the problem persists, please? :)
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.

sirtelen
Registered User
Posts: 6
Joined: Wed Jan 30, 2013 12:15 am

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by sirtelen » Wed Jan 30, 2013 3:31 am

I try to run conversion couple of times. It usually hangs here:

Code: Select all

Fatal installation error
functions_convert.php [ 2321 ]
Could not copy file ./../../smf/Themes/default/images/ to ./../images/ranks/
Please check that the target directory exists and is writable by the webserver.
When i go back to /localhost/bb/install and try to continue conversion it hangs on the user_conv error.
7000 users/4000 files

User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by prototech » Wed Jan 30, 2013 3:52 am

Make sure that the images/ranks/ directory is writable. The problem with the user_conv error occurs because the table is used to check if there are any conflicting usernames. This check is done right before ranks are converted. Once the check is done, the table is dropped. So, when the ranks fail to get copied over and you refresh the page the user_conv table no longer exists and thus you get the database error.
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.

sirtelen
Registered User
Posts: 6
Joined: Wed Jan 30, 2013 12:15 am

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by sirtelen » Wed Jan 30, 2013 4:33 am

Please define "writable". I am running it in local (OSX+MAMP+Logged as admin), so i guess it is writable.
I've chmod the whole phpbb forum to 777. No joy.
Any other way to pass this error?

User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by prototech » Wed Jan 30, 2013 11:07 pm

It doesn't really matter whether you're logged in as an administrator or not as the Apache user (either www or _www) is the one that needs to be able to write to the directory. You need to edit the permissions for that specific directory. Simply modifying the permissions for the board root directory will not apply permissions recursively to its children.
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.

sirtelen
Registered User
Posts: 6
Joined: Wed Jan 30, 2013 12:15 am

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by sirtelen » Thu Jan 31, 2013 1:00 am

Thanks for your support, but still no go with 0.4.3. Weird... :shock:
Found earlier version of this conventor, and it looks like my issue is not permission related. :?:

I just tried rc2 from here:
viewtopic.php?f=65&t=1013655&start=150#p12277955

RC2 reports me Installation Error instead of Fatal Error with 0.4.3 when it comes to same point (ranks).
After a couple of similar installation error messages it goes to the end successfuly. Right now it is doing the search indexing.I didn't check all the stuff, but for now everything seems fine. Users, boards, post, signatures are there. Special characters are messed, but it wont be hard to fix i guess.
Will do another conversion with rc2, because i did'n want to waste time with 19Gb attachment conversion every time.

User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by prototech » Thu Jan 31, 2013 1:28 am

What does the error say when using the RC2 version? I would suggest sticking with the latest version instead of reverting back to the old version.

You can comment out copy_file($src, $trg, false, true, false); in the smf_rank_image() function within functions_smf20.php so that it doesn't attempt to copy the ranks. Then simply copy them yourself.

You can also change 'target' => ATTACHMENTS_TABLE, to 'target' => '', in convert_smf20.php which will make the convertor skip attachments.
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.

sirtelen
Registered User
Posts: 6
Joined: Wed Jan 30, 2013 12:15 am

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by sirtelen » Thu Jan 31, 2013 2:42 am

Case 1
Commenting out ranks from 0.4.3 did the trick.
Thank you sir! :)
Had only one error, everything else went smooth.
(Conversion completed)
Image

Case 2
With unmodified RC2 i got this:
(Conversion completed)
Image

Case 3
With unmodified 0.4.3 i got this:
(Conversion not completed)
Image

nikospkrk
Registered User
Posts: 5
Joined: Thu Jan 03, 2008 10:39 pm
Location: València, España
Name: Nicolas
Contact:

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by nikospkrk » Tue Feb 12, 2013 11:57 am

Just to let you know that I had the same issue as sirtelen (I commented the rank images copy() function), with SMF 2.0.4 and phpBB 3.0.11 plus the following :

Code: Select all

General Error
SQL ERROR [ mysqli ]

Duplicate entry 'adsbot [google]' for key 'username_clean' [1062]

SQL

INSERT INTO phpbb_users (username, username_clean, user_password, user_pass_convert, user_email, user_email_hash, group_id, user_type, user_permissions, user_timezone, user_dateformat, user_lang, user_style, user_actkey, user_ip, user_regdate, user_passchg, user_options, user_new, user_inactive_reason, user_inactive_time, user_lastmark, user_lastvisit, user_lastpost_time, user_lastpage, user_posts, user_dst, user_colour, user_occ, user_interests, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height, user_new_privmsg, user_unread_privmsg, user_last_privmsg, user_message_rules, user_full_folder, user_emailtime, user_notify, user_notify_pm, user_notify_type, user_allow_pm, user_allow_viewonline, user_allow_viewemail, user_allow_massemail, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield, user_form_salt) VALUES ('AdsBot [Google]', 'adsbot [google]', '', 0, '', '00', 29, 2, '', 0, 'D M d, Y g:i a', 'en', 1, '', '', 1360667996, 1360667996, 230271, 0, 0, 0, 1360667996, 0, 0, '', 0, 0, '9E8DA7', '', '', '', 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1, 0, 1, 1, 1, 0, '', '', '', 'e09bbda2f8c4d30a')

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/db/dbal.php
LINE: 754
CALL: trigger_error()

FILE: [ROOT]/includes/db/mysqli.php
LINE: 182
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions_user.php
LINE: 250
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/includes/functions_convert.php
LINE: 1892
CALL: user_add()

FILE: [ROOT]/install/install_convert.php(1654) : eval()'d code
LINE: 2
CALL: add_bots()

FILE: [ROOT]/install/install_convert.php
LINE: 1654
CALL: eval()

FILE: [ROOT]/install/install_convert.php
LINE: 799
CALL: install_convert->jump()

FILE: [ROOT]/install/install_convert.php
LINE: 203
CALL: install_convert->convert_data()

FILE: [ROOT]/install/index.php
LINE: 326
CALL: install_convert->main()

FILE: [ROOT]/install/index.php
LINE: 203
CALL: module->load()
It looks like it's trying to insert twice that smf_member (although there's only one record of this member in SMF), and therefore breaks.
All users have been inserted, all categories, forums and posts have been created but the posts are not linked to any forums and the board doesn't have any forums.
It just says "Total posts 88179 • Total topics 675".

Thanks!

Edit:
Got it working by removing -temporarly- the unique key on phpbb_users.username_clean, and the conversion completed.

User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by prototech » Tue Feb 12, 2013 7:47 pm

Why does your board have a user with that username? The problem isn't that the SMF board has a duplicate user, but instead that the user is conflicting with the "bot users" that phpBB has by default (these are added after the users have been converted). Depending on what its purpose is, you may want to just rename it prior to converting so that it doesn't clash with the bot user with that same name.

As for the ranks not getting copied over, is the phpBB images/ranks/ directory world-writable? I will adjust how it handles that error in the next update -- instead of dying completely, it will simply log it as an error while allowing the conversion to continue, just as the previous versions of the converter had done.
nikospkrk wrote:Edit:
Got it working by removing -temporarly- the unique key on phpbb_users.username_clean, and the conversion completed.
So, do the posts and forums now appear correctly after the conversion finished, or is this still a problem? Note that forums may not show up until you adjust permissions.
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.

nikospkrk
Registered User
Posts: 5
Joined: Thu Jan 03, 2008 10:39 pm
Location: València, España
Name: Nicolas
Contact:

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by nikospkrk » Wed Feb 13, 2013 8:02 am

This forum used to be a phpBB years years ago, then I moved to SMF for their 2.0 version but I decided to move back to phpBB, so maybe this user was created by phpBB before moving to SMF then was imported to SMF as a "standard" user, I don't really know i'm just guessing.

Yes, I did a recursive chmod 777 on the

Code: Select all

images/
folder, no luck.

I did manage to get all the posts, forums and categories working in the end but I had some serious encoding issues with non utf-8 characters replaced by Ã, é, ... ones (it's a french speaking board); which I managed to fix by doing a dump of the database, then open the sql in Notepad++ and replace them one by one. There are almost a 100,000 posts so you can imagine it took me a bit of time to replace all the special characters. I finally re-imported it into my database, and voila.

Cheers,

sirtelen
Registered User
Posts: 6
Joined: Wed Jan 30, 2013 12:15 am

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by sirtelen » Wed Feb 13, 2013 8:43 am

I had the same encoding issues with special characters (Ã, é,...)
You can fix it by replacing SMF charset in /Themes/default/languages/index.french.php

Replace
$txt['lang_character_set'] = 'ISO-8859-1';
to
$txt['lang_character_set'] = 'UTF-8';

NISFLO_Mike
Registered User
Posts: 2
Joined: Thu Feb 14, 2013 10:01 pm

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by NISFLO_Mike » Thu Feb 14, 2013 10:09 pm

Hey all, I couldn't find a better place to post this so here I go.

I attempted to convert my SMF 2.0.x to the latest version of PHPBB. I have roughly 600 posts on the forum and under 200 members. I installed phpbb to a subdir (call it phpbb3) and used the same db as smf on the same server with a different prefex.

I used the converter in this post, and it half worked... I get a 500 error with no information and I don't see a way to find out what exactly the problem is. I'm getting very frustrated :( It apparently imported the posts, but none of the forums, and none of the users. Any way to find out whats going on? And any potential fixes for it? Error pasted below, I doubt it will be helpful. Thanks guys.

Code: Select all

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webadmin@kundenserver.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by prototech » Sun Feb 17, 2013 4:06 am

New version released which includes a critical fix for the smf_set_encoding() function. The function would previously call htmlspecialchars_decode() which resulted in HTML that wasn't rendered in SMF to be rendered in phpBB. It also includes an updated auth_smf.php, so if you have already converted, I would suggest overwriting your current auth_smf.php with the new one.
nikospkrk wrote:I had some serious encoding issues with non utf-8 characters replaced by Ã, é, ... ones (it's a french speaking board)
The new version includes a fix for a bug where it was trying to use the collation for a nonexistent field (possibly one that did exist in SMF 1.1.x?) in the messages table to determine the character set being used. If possible, could you please test the new version and let me know if it resolves this problem? :)

@NISFLO_Mike: your board is quite small, so it's unlikely that you're reaching any resource limits, but you can try reducing the batch size. In convert_smf20.php, find $test_file = 'Settings.php';... after, add $convert->batch_size = 100;. If that doesn't help, try looking through your error log, if you have access to it, to see if there are any clues there.

You can also try adding the following before if (!defined('IN_INSTALL')) in install/install_convert.php:

Code: Select all

@set_time_limit(0);
@ini_set('memory_limit', '256M');
@ini_set('upload_max_filesize', '128M');
@ini_set('post_max_size', '256M');
@ini_set('max_input_time', '-1');
@ini_set('max_execution_time', '-1');
@ini_set('expect.timeout', '-1');
@ini_set('default_socket_timeout', '-1');
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.

sparenton
Registered User
Posts: 2
Joined: Wed Feb 20, 2013 9:47 am

Re: [Convert] Fail convert SMF2.0RC2 to phpBB3.9

Post by sparenton » Wed Feb 20, 2013 10:00 am

Hi everyone,

I have used the 0.4.4 smf2 convertor and i'm quite pleased. Most of the old forum is trnasfered, and nearly everything seems to be in the right place... Still there are some small things missing :

When transfering, there sometimes are links to another posts. As it's in the posts, it maybe hard to detect and correct, but we'll have to change this manually if nothing can be automated... Is it possible to automate this (in a first time) ?

When installing PhpBB3, i create an admin account. When the conversion is finished, this admin account doesn't exist anymore, so i can't rule the newly installed forum... how can i correct this ?

In the same way, most of our previous users are moved from the old to the new, but i tried to connect with my regular user account and it failed, certainly because of the password... how are the password converted, can the users use their previous password or do they have to use the "forgot my password" to have it recalled ?

Thanks in advance for your answers, and MANY thanks for the work done so far (that is really fantastic regarding the time saved on my side ;) )

Locked

Return to “[3.0.x] Convertors”