[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 »

sparenton wrote: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) ?
Try the script attached below (upload to your board root). It will convert links in posts and private messages that are in the following forms:
[Post] http://example.com/smf/index.php?topic=9.msg43#msg43
[Topic] http://example.com/smf/index.php?topic=9.0
[Forum] http://example.com/smf/index.php?board=2.0
[User] http://example.com/smf/index.php?action=profile;u=1

Simply edit the following line:

Code: Select all

$old_board_url = '';
The value should not contain "http://" or "www." and must end with /. For example: example.com/smf/. You must have administrative permissions to run it, so you'll need to rectify the login issue before you will able to use it.
convert_links.php
sparenton wrote: 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 ?
Your password should work after converting, but there is a possibility that some passwords won't work. Does your password contain any special characters out of the A-Z 0-9 range? The converter doesn't actually convert the passwords because that's impossible since they're hashed. Instead, the converter includes a modified version of the default authentication plugin that's shipped with phpBB which is able to compare the SMF password the same way that is done in SMF. This is only done for the first time that the user logs in. Upon a successful login, the auth plugin hashes the password using the standard method used in phpBB.

The latest version fixes a bug where passwords that contain HTML special characters (<>&") were not working, so it is certainly possible that it's a problem with the auth plugin. I will test it with a wider range of characters when I have some time.
sparenton wrote: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 ?
Your user account should already have administrative privileges if you were an administrator in SMF, it's just a matter of you being able to log in. You can run the following query to change your password to 5*uw84hEJumac6t:

Code: Select all

UPDATE phpbb_users SET user_password = "$H$9y2m9jjwelqiKNwsnQ7x4tLAXfZZvr/", password_convert = 0 WHERE user_id = x
Change phpbb_ to your table prefix and x to your user id. If your user id in SMF was 1, it will now be a different id because user id 1 is reserved for the anonymous user in phpBB. You can figure out what your new id is by simply running this query:

Code: Select all

SELECT config_value FROM phpbb_config WHERE config_name = "increment_user_id"
You do not have the required permissions to view the files attached to this post.
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 »

Thank you very much for all these informations, i'll try this all as soon as possible... and again, many thanks for the work done :)
FeanorLethon
Registered User
Posts: 1
Joined: Sat Mar 02, 2013 11:47 pm

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

Post by FeanorLethon »

After using the converter, i go and login into the acp but it keeps forwarding me back to the board index with no login info. It says: Thank you for successfully login in, but redirects me to the main page and i am not showing as logged in.

Ideas?
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 »

It's most likely a problem with your cookie settings. Can you post a link to your board (feel free to PM me if you don't wish to make it public)?
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.
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 »

prototech wrote: @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');

Thank you very much :) I had no idea that the code had the options to set the memory limits and whatnot. Changing the install_convert.php solved the issue completely and the conversion was a complete success. Thank you so much for your hard work. I did find out why the memory limit was reached, it turned out that I had a fleet of spambots that I knew nothing about and SMF allowed them to register but not post, so I ended up having over 4000 members lol. Now I need to figure out a way to remove all of those buggers :(

Thanks again!
wika0071
Registered User
Posts: 1
Joined: Mon Nov 26, 2012 12:42 pm

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

Post by wika0071 »

hello
when i want to convert my smf to phpbb3.0.11 i get this error

Code: Select all

ABORT: PHP cpu time limit exceeded in strtr() called at [/test/includes/utf/utf_tools.php:1058], in utf8_case_fold() called at [/test/includes/utf/utf_tools.php:1654], in utf8_case_fold_nfkc() called at [/test/includes/utf/utf_tools.php:1827], in utf8_clean_string() called at [/test/install/install_convert.php:2005], in call_user_func_array() called at [/test/install/install_convert.php:2005], in install_convert::process_row() called at [/test/install/install_convert.php:1276], in install_convert::convert_data() called at [/test/install/install_convert.php:203], in install_convert::main() called at [/test/install/index.php:326], in module::load() called at [/test/install/index.php:203]
anyone know how to fix it?
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 »

Add the following before if (!defined('IN_INSTALL')) in install/install_convert.php and then rerun the converter:

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.
User avatar
pieterhuizinga
Registered User
Posts: 48
Joined: Tue Jan 08, 2013 5:28 pm
Name: Pieter Huizinga

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

Post by pieterhuizinga »

Hi prototech,

I am admin of my-mc-phoenix.com, on phpBB 3.0.11, a re-incarnation of my-mc.com which has been discontinued. The owner kindly gave me a dump of the original board and I managed to import it using edit scripts and the Generic Message import utility. So far so good.
Unfortunately, in 2011 my-mc.com switched to SMF, so I didn't get to import the content from there on. Again, the owner has kindly offered me to give me a database dump of the SMF board. I'm perfectly willing to give this a shot but have two questions for you upfront.

1. I keep reading here about converting an SMF board into a phpBB board. However, what I will need to do (after a couple test runs ;)) is to merge the SMF content into my existing phpBB board. Is this feasible with your tool? Alternatively if I convert it first to a stand-alone phpBB is it possible to then merge that into the live board?

2. I will not have an SMF board, just its database. Is that sufficient, or does your tool expect to be able to call SMF functions? In other words will I need to install an SMF board?

Thank you for any guidance you can provide.
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 »

pieterhuizinga wrote:However, what I will need to do (after a couple test runs ;)) is to merge the SMF content into my existing phpBB board. Is this feasible with your tool? Alternatively if I convert it first to a stand-alone phpBB is it possible to then merge that into the live board?
No, it's not possible to merge content from SMF into a phpBB board with this converter. It will actually truncate tables before inserting data into them to ensure that it doesn't run into any conflicts. As far as I know there aren't any automated tools to do this, just tutorials such as this one. I can't vouch for the validity of it though as I haven't tried it myself.
pieterhuizinga wrote: 2. I will not have an SMF board, just its database. Is that sufficient, or does your tool expect to be able to call SMF functions? In other words will I need to install an SMF board?
You will need to have a copy of the files because it will attempt to copy over attachments, smilies, topic icons, as well as access the config file and language packs to determine the encoding.
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.
User avatar
pieterhuizinga
Registered User
Posts: 48
Joined: Tue Jan 08, 2013 5:28 pm
Name: Pieter Huizinga

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

Post by pieterhuizinga »

Thanks much even if it isn't what I would have liked to hear... :)
Yes, I have the attachments, smileys etc. as well.

All considered, I will first make an attempt to convert the SMF forums and posts to XML, edit that as I did earlier so URLs get updated, funny characters stripped and html code gets converted to bbcode. Been there, done that, so I don't expect to see much trouble ahead (oops that is a *very* dangerous statement).

Then I'll have to match the SMF userids with the existing userids and make sure the XML posts points to the correct phpBB userid. That should be relatively simple since there were hardly any new users in SMF, most were converted from the old board so I should be able to match the userids by their email address, if they are different to begin with. The couple of new users can be quickly added in phpBB using the STK or with the import users MOD.

After creating the new forums I can then import the posts with the Import Messages MOD as I did earlier.
I don't intend to convert PMs.

It is a process I am now familiar with. I'll make sure to let y'all know how it went, it might be of use for some other folks with a similar challenge.
ddonzal
Registered User
Posts: 14
Joined: Sat Apr 12, 2003 5:28 am
Location: Chicago

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

Post by ddonzal »

Testing this out to convert SMF 2.0.3 to phpBB 3.0.11, and I keep getting the error:
Could not copy file ./..//forum// to ./../files/thumb_

Please check that the target directory exists and is writable by the webserver
I'm running this in a dev envirornment locally using XAMPP for Windows. Since it is local and not accessible to the Internet, I gave 'Everyone' full access to phpbb/forum (this is the location of a copy of the files from my old board) and to phpbb/files/. I did this after getting the error. I hit back a couple times on my browser to try running it again, but I got the same error. Do I need to start the conversion from scratch again or is there something else your converter needs?

Thanks in advance,
Don
ddonzal
Registered User
Posts: 14
Joined: Sat Apr 12, 2003 5:28 am
Location: Chicago

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

Post by ddonzal »

So I took the advice from previous posts in this thread, and I prevented the script from importing. That allowed me to get past the errors mentioned previously. But then it got stuck at 12 of 22, and I keep getting:

The connection to the server was reset while the page was loading.

I then tried your other suggestions about adding $convert->batch_size = 100; and, although I had already modified my local settings for XAMPP timeouts, filesizes, etc. I still went and added:

@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');

to install/install_convert.php.

This allowed me to get a couple more times through step 12 with several batches of 100, but it eventually failed again with the connection to server error.

Your assistance in getting me through these final few steps is greatly appreciated,
Don
ddonzal
Registered User
Posts: 14
Joined: Sat Apr 12, 2003 5:28 am
Location: Chicago

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

Post by ddonzal »

ping

Don
ddonzal
Registered User
Posts: 14
Joined: Sat Apr 12, 2003 5:28 am
Location: Chicago

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

Post by ddonzal »

Should I try sending an ACK?

Don
ddonzal
Registered User
Posts: 14
Joined: Sat Apr 12, 2003 5:28 am
Location: Chicago

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

Post by ddonzal »

Helllloooo.... ellllooo... ellooo... loo... oo

Don

Return to “[3.0.x] Convertors”