News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

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

Frankenstine

Quote from: TE on January 19, 2011, 02:20:33 PM
phpbb attachments should be converted, but they are by default only visible to regular members.. as a guest you can't see attachments.
So, this must be a permission issue.
Previously created admin user was dropped at conversion, so I tried to enter old one, from original forum. I entered (and system advised me to change password), but can't do anything. Even user's menu consist of just three links: "home", "help" and "logout". Can't post, can't change password, can't enter profile at all. New users are fine.
Somehow I need to create admin user or set admin rights to existed user, not using forum engine, by some sql command. Perhaps converter need to be nice to set default permissions or at least set admin for selected user account.


Frankenstine

Now I'm happy :) Thank you, TE, I see attaches and can fix permissions for users.

Hazin

Taking over administration on a site that is running  PHPBB: 3.0.7-PL1   - i dont know the upgrade history - but ive always ran SMF in the past, so installed a brand new SMF 2.0 RC4   Tonight.

Went and got the  PHPBB3 to SMF 2.0 Converter - and get the messages below when i Run it.  Any help would be great, getting a forum up and working would be great.






Notice: Undefined index: convert_script in /home/aa1/public_html/forums/convert.php on line 982

Warning: Invalid argument supplied for foreach() in /home/aa1/public_html/forums/convert.php on line 985

Notice: Undefined index: convert_script in /home/aa1/public_html/forums/convert.php on line 997
Successful.
Recalculating forum statistics...
Notice: Undefined variable: result in /home/aa1/public_html/forums/convert.php on line 2504

Notice: Undefined variable: result in /home/aa1/public_html/forums/convert.php on line 2505

Notice: Undefined index: db_fetch_assoc in /home/aa1/public_html/forums/convert.php on line 1396

Fatal error: Function name must be a string in /home/aa1/public_html/forums/convert.php on line 1396

ThorstenE

Hazin,
this seems to be a broken session, please check Common conversion errors.

Advertisement: