News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[SMF Converter] IPB 1.3.x

Started by JayBachatero, January 28, 2007, 02:56:33 PM

Previous topic - Next topic

JayBachatero

Software: IPB
Version: 1.3.x

This is the official support topic for IPB 1.3 converter.  Use this topic to ask for support for this converter.  I merged all the changes that were floating around.  Lets use this topic to get a final working version.

Changelog
! Initial update
! Poll convert update.

convert.php
Use this convert.php with the .sql file attached in this topic.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Puc conDoin

#1
Hi, I have a problem with the converter.

I have the following error:

QuoteConverting poll options... Unsuccessful!
This query:

    INSERT INTO `forzona`.smf_poll_choices
    (ID_POLL, ID_CHOICE, label, votes)
    VALUES (187, SUBSTRING('0', 1, 255), 'foto1: foto van Janet.', 1, 255), '3'),
    (187, SUBSTRING('1', 1, 255), 'foto2: foto van Maj', 1, 255), '3'),
    (187, SUBSTRING('2', 1, 255), 'foto3: foto van Loebas', 1, 255), '2'),

and at the bottom of the page:

QuoteCaused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''3'),
    (187, SUBSTRING('1', 1, 255), 'foto2: foto van Maj', 1, 255), '3'' at line 3

And this is the exported query from the IPB database:

QuoteINSERT INTO `ibf_polls` VALUES (187, 7338, 1129495368, 'a:8:{i:0;a:3:{i:0;i:0;i:1;s:23:"foto1:  foto van Janet.";i:2;i:3;}i:1;a:3:{i:0;i:1;i:1;s:20:"foto2:  foto van Maj";i:2;i:3;}i:2;a:3:{i:0;i:2;i:1;s:23:"foto3:  foto van Loebas";i:2;i:2;}i:3;a:3:{i:0;i:3;i:1;s:22:"foto4:  foto van Mesje";i:2;i:1;}i:4;a:3:{i:0;i:4;i:1;s:22:"foto5:  foto van Cyber";i:2;i:1;}i:5;a:3:{i:0;i:5;i:1;s:20:"foto6:  foto van Puc";i:2;i:3;}i:6;a:3:{i:0;i:6;i:1;s:22:"foto7:  foto van Heidi";i:2;i:2;}i:7;a:3:{i:0;i:7;i:1;s:23:"foto8:  foto van Shanon";i:2;i:0;}}', 95, 15, 8, 'Hier kun je stemmen, en geef ook je commentaar');

How can I correct this error, to get the conversion to work?

Puc conDoin

I've tried Sarke's solution: http://www.simplemachines.org/community/index.php?topic=137630.msg903435#msg903435

But now I get this error:

QuoteCaused the error:

    Duplicate entry '12-0' for key 1

JayBachatero

Quote from: Puc conDoin on February 04, 2007, 02:44:00 PM
I've tried Sarke's solution: http://www.simplemachines.org/community/index.php?topic=137630.msg903435#msg903435

But now I get this error:

QuoteCaused the error:

    Duplicate entry '12-0' for key 1
Ok what table did you get this error on?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Puc conDoin

Still the same table: `forzona`.smf_poll_choices

JayBachatero

Truncate the table and try again.  I just reuploaded the file.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Puc conDoin

Did you mean that I had to empty the table?

I reinstall SMF (after deleting all SMF tables) every time I have an error on the conversion. Then I restart the conversion from the beginning.

I used your newly uploaded sql-file, but got the same error on the same table:

Duplicate entry '12-0' for key 1  

Puc conDoin

Even when I remove entry 12 from the original database, I still get the "Duplicate entry"-error. On the next database row that follows.

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Puc conDoin

Thanx! The error on the poll choices table didn't show up anymore!  ;D

But unfortunately, another error has come up:

QuoteConverting personal messages (step 1)... Unsuccessful!
This query:

    INSERT IGNORE INTO `forzona`.smf_personal_messages
    (ID_PM, ID_MEMBER_FROM, msgtime, fromName, subject, body)

and

QuoteCaused the error:

    Got a packet bigger than 'max_allowed_packet' bytes

Orb!ter

Hi,

Out of interest, has the un-html_special_chars been implemented yet?

Thanks,
Orb!ter

Puc conDoin

Quote from: Puc conDoin on February 08, 2007, 05:12:09 PM
QuoteCaused the error:

    Got a packet bigger than 'max_allowed_packet' bytes

I tried to run the conversion on another server, with older versions of PHP and MySQL (3.23), which resulted in this error:

QuoteConverting personal messages (step 1)... Unsuccessful!
This query:

    INSERT INTO `forzona_nl`.smf_personal_messages
    (ID_PM, ID_MEMBER_FROM, msgtime, fromName, subject, body)

and

QuoteCaused the error:

    MySQL server has gone away

The MySQL documentation site says something about a maximum allowed packet size of 1 Mb:

http://dev.mysql.com/doc/refman/5.0/en/gone-away.html and http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html

JayBachatero

Quote from: Orb!ter on February 09, 2007, 02:11:55 AM
Hi,

Out of interest, has the un-html_special_chars been implemented yet?

Thanks,
Orb!ter
No not yet.  I'll try and look into it tonight when I get home from school.

Puc conDoin you will need to ask your host about this error.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Puc conDoin

Quote from: JayBachatero on February 09, 2007, 01:21:14 PM
Puc conDoin you will need to ask your host about this error.

Ok, are you sure about this?

What would happen if you limit the conversion of personal messages to 50 or 100 at a time? How many are converted at a time in the current conversion-program?

JayBachatero

If I'm correct the limit is 200 or 500.  One of the two.  You can try limiting it to just 100.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Puc conDoin

Where do I find this? Can I change that in this code in convert.php?

$special_table = strtr(trim(substr($line, 4)), array('{$to_prefix}' => $to_prefix));

if (preg_match('~^([^ ()]+?)( \(update .+?\))? (\d+)$~', trim($special_table), $match) != 0)
{
$special_table = $match[1];
$special_update = $match[2] != '' ? substr($match[2], 9, -1) : '';
$special_limit = empty($match[3]) ? 500 : (int) $match[3];
}
elseif (preg_match('~^([^ ()]+?) \(update (.+?)\)$~', trim($special_table), $match) != 0)
{
$special_table = $match[1];
$special_update = $match[2];
$special_limit = 200;
}
else
{
$special_update = false;
$special_limit = 500;
}

JayBachatero

No need to edit convert.php.  In the .sql file there is a line like this ---* {$to_prefix}tablename   Change that to ---* {$to_prefix}tablename 100.  The 100 is the limit.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Puc conDoin

Ok, thanx! I will try this today and let you know how this works out.

Puc conDoin

Quote from: JayBachatero on February 12, 2007, 01:52:43 AM
No need to edit convert.php.  In the .sql file there is a line like this ---* {$to_prefix}tablename   Change that to ---* {$to_prefix}tablename 100.  The 100 is the limit.

Thank you very much for this! This solution worked, and now everything seems to be converted!

Puc conDoin

I've had some problems while editing board online/offline settings in the SMF admin panel. After saving, the whole forum went blank for everyone.

I've found what caused the problem. The board offline message in the configuration file was in a multi-line format. IPB supported this. SMF seems to support only single line messages.

When I looked in my SMF configuration file, I found out that the first line in the board-offline message was the one I set before via the SMF admin-panel. But the following lines after that one, were from my old IPB configuration file!

After removing those "old" lines, the problem was gone.

Maybe this is a little glitch in the conversion process?

Advertisement: