[BETA] SMF 1.0.x Converter

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
wobo
Registered User
Posts: 128
Joined: Tue May 04, 2004 4:28 am

Post by wobo »

D¡cky wrote: The convertor for SMF 1.1 RC2 is smf 1.1 RC2 convertor

Hmm, unfortunately all this is very confusing. Here's what I did:

1. Installed phpBB 2.0.22, just one user (the admin)
2. Installed SMF 1.1RC2 with a couple of dummy users and a couple of dummy test messages.

Both are in the same database (smf_ and phpbb_ as prefixes). Both are fresh installations without any MODs. I installed the UCS and the converter you mentioned in the quoting, following the README in the UCS zip.

Aside from the confusing hint that this converter is ONLY for SMF 1.0.x and NOT for 1.1x it gives me the error message:

Code: Select all

Couldn't obtain table information.

DEBUG MODE

SQL Error : 1054 Unknown column 'members.ID_GROUP' in 'on clause'

SELECT membergroups.ID_GROUP, membergroups.groupName FROM smf_membergroups membergroups LEFT JOIN smf_members AS ID_GROUP ON members.ID_GROUP = membergroups.ID_GROUP, smf_members members ORDER BY members.ID_GROUP ASC

Line : 711
File : index.php
Any idea what that means and what I can do about it?

wobo
dennsy
Registered User
Posts: 5
Joined: Thu Dec 28, 2006 9:08 pm
Contact:

Post by dennsy »

Converted a board ok, now guests cannot post? Eror message 'user name disallowed'?


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

wobo wrote: <snip> it gives me the error message:

Code: Select all

Couldn't obtain table information.

DEBUG MODE

SQL Error : 1054 Unknown column 'members.ID_GROUP' in 'on clause'

SELECT membergroups.ID_GROUP, membergroups.groupName FROM smf_membergroups membergroups LEFT JOIN smf_members AS ID_GROUP ON members.ID_GROUP = membergroups.ID_GROUP, smf_members members ORDER BY members.ID_GROUP ASC

Line : 711
File : index.php
Any idea what that means and what I can do about it?

wobo

The query doesn't work with MySQL 5. It will work on MySQL 4 if you have it available to use.
More reading on this problem, http://www.phpbb.com/phpBB/viewtopic.php?t=441420

dennsy wrote: Converted a board ok, now guests cannot post? Eror message 'user name disallowed'?

:?:

See this topic, http://www.phpbb.com/phpBB/viewtopic.php?t=378041
Have you hugged someone today?
folkestoneforums
Registered User
Posts: 3
Joined: Mon Apr 16, 2007 11:27 am

Re: [BETA] SMF 1.0.x Converter

Post by folkestoneforums »

I cant even get this thing working lol! I followed the instructions to the letter and when i run the convertor it it navigates to a blank white screen, with the status bar at the bottom saying Done! Any ideas? Cheers Guys!!!

edit: i get this message to:

Fatal error: Call to undefined function: session_pagestart() in /home/******/public_html/forum/con/convert/index.php on line 36
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: [BETA] SMF 1.0.x Converter

Post by D¡cky »

It appears that you have the convertor folder in the wrong place.

It should be /home/******/public_html/forum/convert/index.php

The convert folder should be in your phpBB root directory
Have you hugged someone today?
User avatar
Merri
Registered User
Posts: 255
Joined: Mon Nov 25, 2002 1:08 pm
Location: Riihimäki, Finland
Contact:

Re: [BETA] SMF 1.0.x Converter

Post by Merri »

For those who consider it, I converted SMF into phpBB3 via phpBB2 nicely. Didn't have too much trouble with the actual conversion. Of course I missed all the attachments and avatars and other small stuff, but they're not essential for forum to work (atleast in the forum I converted).

To get SMF login to work, you only need two changes in includes/auth/auth_db.php:

Code: Select all

FIND: (after midpoint in the file)

if (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'])

REPLACE WITH:

if (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'] || md5_hmac($password, strtolower($username)) == $row['user_password'])


FIND: (at end of file)

?>

BEFORE, ADD:

// encrypts password for smf users
function md5_hmac($data, $key)
{
	$key = str_pad(strlen($key) <= 64 ? $key : pack('H*', md5($key)), 64, chr(0x00));
	return md5(($key ^ str_repeat(chr(0x5c), 64)) . pack('H*', md5(($key ^ str_repeat(chr(0x36), 64)). $data)));
}
And that's all that is into it, users can login and their passwords get converted into phpBB3 format.
dreamer2007
Registered User
Posts: 42
Joined: Sat Jul 21, 2007 10:52 am

Re: [BETA] SMF 1.0.x Converter

Post by dreamer2007 »

Merri wrote:For those who consider it, I converted SMF into phpBB3 via phpBB2 nicely. Didn't have too much trouble with the actual conversion. Of course I missed all the attachments and avatars and other small stuff, but they're not essential for forum to work (atleast in the forum I converted).

To get SMF login to work, you only need two changes in includes/auth/auth_db.php:

Code: Select all

FIND: (after midpoint in the file)

if (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'])

REPLACE WITH:

if (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password'] || md5_hmac($password, strtolower($username)) == $row['user_password'])


FIND: (at end of file)

?>

BEFORE, ADD:

// encrypts password for smf users
function md5_hmac($data, $key)
{
	$key = str_pad(strlen($key) <= 64 ? $key : pack('H*', md5($key)), 64, chr(0x00));
	return md5(($key ^ str_repeat(chr(0x5c), 64)) . pack('H*', md5(($key ^ str_repeat(chr(0x36), 64)). $data)));
}
And that's all that is into it, users can login and their passwords get converted into phpBB3 format.
Hi,

thank's, but can the new registred membres login in with'nt problem ?
User avatar
Merri
Registered User
Posts: 255
Joined: Mon Nov 25, 2002 1:08 pm
Location: Riihimäki, Finland
Contact:

Re: [BETA] SMF 1.0.x Converter

Post by Merri »

Yes. It only adds more checks for converting passwords to phpBB3 format.
allchemic
Registered User
Posts: 1
Joined: Fri Aug 24, 2007 3:37 am

Re: [BETA] SMF 1.0.x Converter

Post by allchemic »

is there any workaround for situation when smf base using utf8, and u get ??????? instead ążćźśńółę (etc) when u converting forum? all other works fine, posts, topics, pw. all goes perfect.
User avatar
Merri
Registered User
Posts: 255
Joined: Mon Nov 25, 2002 1:08 pm
Location: Riihimäki, Finland
Contact:

Re: [BETA] SMF 1.0.x Converter

Post by Merri »

Look for portions in the convert code that do utf8decode or use iconv to convert to other character sets. Removing all these references should make your board remain UTF-8. My original board happened to be ISO-8859-15 so I didn't have this problem.
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: [BETA] SMF 1.0.x Converter

Post by D¡cky »

The convertor does nothing to change characters. All characters are transferred over untouched. If you are having a problem with character encoding, then it is a problem with exporting/importing the database or the character collation is not set correctly for the table or fields.
Have you hugged someone today?
xScopex
Registered User
Posts: 5
Joined: Wed Sep 05, 2007 10:49 am

Re: [BETA] SMF 1.0.x Converter

Post by xScopex »

I uploaded the convert_smf.php. Then when I go to that link nothing shows up. what am I do wrong???? please 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: [BETA] SMF 1.0.x Converter

Post by D¡cky »

Did you get the Common UCS files?
Have you hugged someone today?
xScopex
Registered User
Posts: 5
Joined: Wed Sep 05, 2007 10:49 am

Re: [BETA] SMF 1.0.x Converter

Post by xScopex »

This is what I get now when I try.

Code: Select all

Could not find these tables: smf_banned, smf_instant_messages, smf_im_recipients.

Please check your table prefix and try again.

The default table prefix for SMF 1.0.x is smf_
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: [BETA] SMF 1.0.x Converter

Post by D¡cky »

What version of SMF are you converting from? If SMF 1.1.x, then you need to use the 1.1.x convertor.
Have you hugged someone today?
Locked

Return to “[2.0.x] Convertors”