News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Error converting phpbb3 to smf 2

Started by toolbox, November 08, 2009, 08:28:23 AM

Previous topic - Next topic

toolbox

I get this error message and don't know what to do next, can anyone help please.
Converting from phpbb3 to smf 2 rc1.

Converting boards...Wrong value type sent to the database. Integer expected. (id_cat)

narqelion

What converter did you use, i.e. where did you get it, off the downloads page or buried somewhere here in the forums?  Also what version of phpBB3 are you converting from ?  :)

Norv

For converting from phpbb3 to SMF 2.0 please try using the attached files instead.
narquelion is right, there were a number of bug fixes in the 2.0 converters which are not yet included on the converters available on the downloads page.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

toolbox

Many thanks all running now using enclosed files.

vad710

Sorry to be necroing a thread, but where are these files maintained? so that I can be sure to get the most recent version?

The other thread, is dated Jan 2008


Norv

Yes, the latest versions available should be on the download site, and normally those should be updated as necessary.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

vad710

Not sure if this is the right place for it, but I am getting an error on line 740, it's trying to execute this query: "SHOW CHARACTER SET"

I tried to execute that on myphpAdmin and it would not execute either. I did look up the query on the MySQL Website and it is a proper database query. I am assuming that maybe my database user account does not have access to characterset inforamtion?

Is there some modification i can make to the script to make it work? Can I default to a specific character set?

ThorstenE

huh, your  MySQL-Version is propably outdated (4.0 or lower)..
untested but it should work, in convert.php find:
// Get a list of character sets supported by your MySQL server.
$result = @mysql_query("
SHOW CHARACTER SET;");
$db_charsets = array();
while ($row = mysql_fetch_assoc($result))
$db_charsets[] = $row['Charset'];

replace with:
// Get a list of character sets supported by your MySQL server.
$db_charsets = array('latin1');

vad710

Thanks, that seemed to get me further along, though now I am running into this:

Converting posts...The database value you're trying to insert does not exist: modified_name

Frankenstine

Same problem.

...
Converting topics... Successful.
Converting posts...The database value you're trying to insert does not exist: modified_name

Forum's db was originally phpbb2, converted to phpbb3, now i want to goto smf2.

ThorstenE

mhh, maybe we can fix it.. in phpbb3_to_smf.sql find:
$row['body'] = stripslashes($row['body']);
add after:
if(empty($row['modified_name']))
    $row['modified_name'] = 'Guest';

Frankenstine

It's working, thanks, but that was not single place where error has been occur.
Converting posts...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)...The database value you're trying to insert does not exist: from_name

And, result of converting messages: every message, never edited, after converting become edited by guest at 01 January 1970, 03:00:00 am. That is not good enough, I think it must be set to edited by post author and time set to original post time or something another but still having sense.

ThorstenE

ok, please find (in phpbb3_to_smf.sql):
---* {$to_prefix}personal_messages
add after:
---{
if(empty($row['from_name']))
    $row['from_name'] = 'Guest';
---}

Frankenstine

#14
Yes, it's work! Converting complete.
Found issues:
* Every post has "Last edited at 01 January 1970, 03:00:00 am by Guest", if it was never edited
* Permissions are messed up, for boards and for users, user even can't enter to profile settings (maybe needed to have administrator login if "target" SMF, not existent in "source" phpbb3, to fix permissions after converting? I'll try to do so). AFAIR, this is "documented behavior". Did I need to apply "phpbb3 password fix"? Forum seems to permit user login, but telling "password sheme was changed" or something like this (I used localized engine).
* Attachments don't converted. Seems it supposed to work.
+ Avatars are converted! In topic "phpbb3 to smf converter" avatars are in "won't convert" list.

ThorstenE

- SMF 2.0 (RC4) should support your old phpBB passwords by default ,no need to install the login fix.
- permissions are AFAIK not part of the converter
- the "edit by" issue is fixable via phpMyAdmin, just execute this sql statement:
UPDATE smf_messages SET modified_name ='' WHERE modified_name ='Guest';

Frankenstine

Oh. shi... :) I was wrong, converting was not successful. Stopped at step 2 substep 11, as I see. Error from mysql was displayed in wrong charset, and I didn't figured out that it is error report in first look. Now i converted message and get explanation (translation to english):
Recalculating forum statistics... Duplicate key name 'ip_index'
So, to converting of attaches script maybe simply not reached? :)


Frankenstine

Thank you! Now its done without any errors.
Still one question - what about attachments? :) I see only string like
[attachment=4:1fmd5jpu]p0001.jpg[/attachment:1fmd5jpu]
instead of attached images and no links to download attachment. Is it broken?

ThorstenE

phpbb attachments should be converted, but they are by default only visible to regular members.. as a guest you can't see attachments.
the above strings seems to be a placeholder for inline attachments? we could remove these lines, just edit phpbb3_to_smf.sql and find:
$row['body'] = preg_replace('~\[size=(.+?)px\]~is', "[size=" . ('\1' > '99' ? 99 : '"\1"') . "px]", $row['body']);
add after:
$row['body'] = preg_replace('~\[attachment(.+?)\](.+?)\[\/attachment(.+?)\]~is', '', $row['body']);

Advertisement: