News:

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

Main Menu

Help, Error Converting IPB2 to SMF 1.1 RC3

Started by 700yearsago, October 11, 2006, 05:59:37 PM

Previous topic - Next topic

700yearsago

Hey,
  I saw a solution to this for 1.3.1ipb, but I use 2.
It gets through most of the converting except for
QuoteConverting poll options... Unsuccessful!
This query:
INSERT INTO `dynamic1_SMF2`.smf_poll_choices
(ID_POLL, ID_CHOICE, label, votes)
VALUES (3, SUBSTRING('0', 1, 255), 'Hell yes, he had the 'hood going crazy!', 1, 255), '0'),
(3, SUBSTRING('1', 1, 255), 'Naw son, it's just a thread.', 1, 255), '1'),
(3, SUBSTRING('2', 1, 255), 'Cheesecake?', 1, 255), '5'),
(3, SUBSTRING('3', 1, 255), 'Reaganomics!', 1, 255), '0'),
(3, SUBSTRING('4', 1, 255), '06/6/2006 was a good day for mah.', 1, 255), '0'),
(3, SUBSTRING('5', 1, 255), '*SPEC* should be changed to *GOVENATOR*', 1, 255), '2'),
(9, SUBSTRING('0', 1, 255), 'yes', 1, 255), '7'),
(9, SUBSTRING('1', 1, 255), 'no', 1, 255), '4');
Caused 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 ''0'),
(3, SUBSTRING('1', 1, 255), 'Naw son, it's just a thread.', 1,' at line 3

Could anyone please help?

700yearsago

Also when I go to the converted forum, none of the forums or posts are there.

Oldiesmann

#2
Try this one.

EDIT: Removed attachment. Read on for a working converter...
Michael Eshom
Christian Metal Fans

700yearsago

I got
QuoteFatal error: Call to undefined function: addslashes__recursive() in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 7

Oldiesmann

#4
Whoops! One too many underscores there :)

EDIT: Removed another buggy converter. Keep reading...
Michael Eshom
Christian Metal Fans

700yearsago

QuoteNotice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8
Unsuccessful!
This query:

    INSERT INTO `dynamic1_SMF2`.smf_poll_choices
    (ID_POLL, ID_CHOICE, label, votes)
    VALUES (3, 0, SUBSTRING('Hell yes, he had the 'hood going crazy!', 1, 255), )),
    (3, 1, SUBSTRING('Naw son, it's just a thread.', 1, 255), )),
    (3, 2, SUBSTRING('Cheesecake?', 1, 255), )),
    (3, 3, SUBSTRING('Reaganomics!', 1, 255), )),
    (3, 4, SUBSTRING('06/6/2006 was a good day for mah.', 1, 255), )),
    (3, 5, SUBSTRING('*SPEC* should be changed to *GOVENATOR*', 1, 255), )),
    (9, 0, SUBSTRING('yes', 1, 255), )),
    (9, 1, SUBSTRING('no', 1, 255), ));

Caused 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, 1, SUBSTRING('Naw son, it's just a thread.', 1, 255), )),
    ' at line 3

Oldiesmann

#6
Whoops! Another typo. I had $choice[3] instead of $choice[2]...
Michael Eshom
Christian Metal Fans

700yearsago

I'm getting the same error... about the polls thing.

Oldiesmann

Make sure you overwrote the sql file on your server with the one in your package. There are definitely three items in that array, so $choice[2] should be defined.
Michael Eshom
Christian Metal Fans

700yearsago

Re uploaded it,
still got
QuoteConverting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options... Unsuccessful!
This query:
INSERT INTO `dynamic1_SMF2`.smf_poll_choices
(ID_POLL, ID_CHOICE, label, votes)
VALUES (3, 0, SUBSTRING('Hell yes, he had the 'hood going crazy!', 1, 255), 0)),
(3, 1, SUBSTRING('Naw son, it's just a thread.', 1, 255), 1)),
(3, 2, SUBSTRING('Cheesecake?', 1, 255), 5)),
(3, 3, SUBSTRING('Reaganomics!', 1, 255), 0)),
(3, 4, SUBSTRING('06/6/2006 was a good day for mah.', 1, 255), 0)),
(3, 5, SUBSTRING('*SPEC* should be changed to *GOVENATOR*', 1, 255), 2)),
(9, 0, SUBSTRING('yes', 1, 255), 7)),
(9, 1, SUBSTRING('no', 1, 255), 4));
Caused 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, 1, SUBSTRING('Naw son, it's just a thread.', 1, 255), 1)),
' at line 3

Oldiesmann

Ah. This time it's an extra ")"... Sorry about that :)

Michael Eshom
Christian Metal Fans

700yearsago

QuoteNotice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8

Notice: Undefined index: 3 in /home/dynamic1/public_html/forum2/convert.php(814) : eval()'d code on line 8
Unsuccessful!
This query:
INSERT INTO `dynamic1_SMF2`.smf_poll_choices
(ID_POLL, ID_CHOICE, label, votes)
VALUES (3, 0, SUBSTRING('Hell yes, he had the 'hood going crazy!', 1, 255), )),
(3, 1, SUBSTRING('Naw son, it's just a thread.', 1, 255), )),
(3, 2, SUBSTRING('Cheesecake?', 1, 255), )),
(3, 3, SUBSTRING('Reaganomics!', 1, 255), )),
(3, 4, SUBSTRING('06/6/2006 was a good day for mah.', 1, 255), )),
(3, 5, SUBSTRING('*SPEC* should be changed to *GOVENATOR*', 1, 255), )),
(9, 0, SUBSTRING('yes', 1, 255), )),
(9, 1, SUBSTRING('no', 1, 255), ));
Caused 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, 1, SUBSTRING('Naw son, it's just a thread.', 1, 255), )),
' at line 3

Oldiesmann

Sorry about that. Somehow I attached the wrong package. This one should work.
Michael Eshom
Christian Metal Fans

700yearsago

Awesome! It works.
All my thanks go to you.

I think you should update your converter page so they download the right one.

daveb47

Hi Oldiesman,Having yet another try at converting from ipb 2.13 to smf i.i rc3 but am getting this error

Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll logs... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting moderators... Successful.
Converting yearly events... Successful.
Converting permissions... Successful.
Converting board permissions...
Notice: unserialize(): Error at offset 5 of 160 bytes in /home/arnold/public_html/arnoldorg/smf/convert.php(653) : eval()'d code on line 89

Fatal error: Unsupported operand types in /home/arnold/public_html/arnoldorg/smf/convert.php(653) : eval()'d code on line 89


Cheers
Dave
https://daveb47.co.uk

A Slinky is like Jeremy CorbynWinehouse,Weird looking,Not really of any use to anybody.
But its really funny when it falls down the stairs!!:D:D

Oldiesmann

Try this copy of invision2_to_smf.sql - slashes weren't getting stripped before unserialize() was called there, which is what was causing the error.
Michael Eshom
Christian Metal Fans

InvisibleMan78

I have a similar problem like daveb47 (but on a win2k3-server with IIS), running your latest version of 'invision2_to_smf.sql'. The following error appears:
QuoteConverting...
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options...
Parse error: parse error in c:\Inetpub\wwwroot\smf\convert.php(814) : eval()'d code on line 10
Unsuccessful!
This query:
INSERT INTO `smf`.smf_poll_choices
(ID_POLL, choices)
VALUES ('1', 'a:3:{i:0;a:3:{i:0;i:0;i:1;s:59:\"Ja, mich stören "gestern", "heute" etc.\";i:2;i:3;}i:1;a:3:{i:0;i:1;i:1;s:42:\"Nein, ich finde die relativen Datümer cool\";i:2;i:2;}i:2;a:3:{i:0;i:2;i:1;s:13:\"Mir doch egal\";i:2;i:0;}}');
Caused the error:

Unknown column 'choices' in 'field list'
Thank you for your help in advance!!

InvisibleMan78

#17
Since the polls are not that important for my test-installation, I changed the the latest *.sql-script on line 227 to:
SELECT pid AS ID_POLL, 'ID_POLL', 'ID_CHOICE', 'label', 'votes'I have no idea why, but now the convert-process runs - until the final message about "recalculating counters". This will never end (I stopped it manually after more then 45 minutes).

Some more problems about this convert-process:
- The passwords for the existing users from IBP doesn't work! After a fresh install of SMF, the admin-account works perfect.
But the convert-process overwrite the password for the admin - unfortunately not with the same password as in the source (IBP). This is also true for all the other users - no one can login with the same password as in the original board. Is this "by design"?

- The attachments are all converted and saved on the right place with the right message. Unfortunately, there are no thumbnails for this attachments. If I add a new post with a picture, everything works fine. But the converted one doesn't have a thumbnail. Is it possible to generate them too?

- The avatars are not converted correctly. The picture-link points to /smf/avatars/Smiley_Avatars/smiley-punched.gif - but there is no subdirectory called "Smiley_Avatars" (only "Actors" and "Musicians").

- The ranking-names are not converted.

- Not all the icons are converted. Some of them like "smiley.gif", "wink.gif" or "cheesy.gif" are correct, others like ":ph34r:" or ":rolleyes:" are visible as text

- By default the (unregistered) guests can read the entire (converted) forum. This should be deactived for guests like in the original (IBP)-board. I think that every Administrator should enable the boards for specific groups, not for everyone...

- The PM's (in/out) are not available. I can see a Label called "(10)". The error-message in Admin-Center-Errorlog is:
Quotehttp://sitename.somewhere/smf/index.php?action=pm 
8: Undefined index: id
Datei: c:\Inetpub\wwwroot\smf\Sources\PersonalMessage.php
Zeile: 258
It should convert 8 PM's (3 in / 5 out).

Oldiesmann

#18
Quote from: InvisibleMan78 on October 26, 2006, 12:18:38 PM
I have a similar problem like daveb47 (but on a win2k3-server with IIS), running your latest version of 'invision2_to_smf.sql'. The following error appears:
QuoteConverting...
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting polls... Successful.
Converting poll options...
Parse error: parse error in c:\Inetpub\wwwroot\smf\convert.php(814) : eval()'d code on line 10
Unsuccessful!
This query:
INSERT INTO `smf`.smf_poll_choices
(ID_POLL, choices)
VALUES ('1', 'a:3:{i:0;a:3:{i:0;i:0;i:1;s:59:\"Ja, mich stören "gestern", "heute" etc.\";i:2;i:3;}i:1;a:3:{i:0;i:1;i:1;s:42:\"Nein, ich finde die relativen Datümer cool\";i:2;i:2;}i:2;a:3:{i:0;i:2;i:1;s:13:\"Mir doch egal\";i:2;i:0;}}');
Caused the error:

Unknown column 'choices' in 'field list'
Thank you for your help in advance!!


That means that the unserialize() function isn't working for some reason.

Changing the polls thing the way you did won't fix things, and I'm actually a bit surprised that it worked since there are only 4 columns in SMF's table...

As for the other issues:

Passwords - SMF does attempt to detect IPB's password-hashing method. Unless they changed it, passwords should work. You might be asked to re-enter your password the first time you login, but after doing so you should be able to login just fine.

Thumbnails - I'll look into that.

Avatars - Apparently the converter doesn't try to copy over avatars. I'll look into that as well.

Ranks - Not sure why those aren't converted. What are the IDs of these groups? Are they stored in the groups table in IPB as well?

Icons - Admin -> Smileys and Smiley Sets, check the box next to "Enable custom smileys" and save the changes. Do they show up after that?

Permissions/Board access - What permission in IPB controls board access?

Labels - this is due to a typo in the converter. Run the following query in phpMyAdmin to fix it:

UPDATE smf_members SET labels='-1';

Thanks for the feedback. We're still trying to fix all the issues - some things that work for some users won't work for others...
Michael Eshom
Christian Metal Fans

devicenull

Problem with Mysql5 and this converter..

QuoteConverting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Unsuccessful!
This query:

    INSERT INTO `newfrms`.smf_topics
    (ID_TOPIC, isSticky, ID_BOARD, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, ID_POLL, numReplies, numViews, ID_FIRST_MSG, ID_LAST_MSG, locked)
    VALUES ('2', '0', '1', '1', '1', '', '0', '198', '2', '2', '0'),
    ('3', '0', '3', '2', '5', '', '30', '224', '3', '289', '0'),
    ('4', '1', '12', '1', '602', '', '155', '3205', '11', '52891', '0'),
...
Caused the error:

    Incorrect integer value: '' for column 'ID_POLL' at row 1

To fix this:
The sql file, line 127 becomes "   COALESCE(pl.pid,0) AS ID_POLL, t.posts AS numReplies, t.views AS numViews," minus the quotes.  This may not work on mysql <5 though.

Similar error fixed: sql, line 184 becomes "   COALESCE(p.edit_time,0) AS modifiedTime, SUBSTRING(p.edit_name, 1, 255) AS modifiedName,"

All I added is the COALESCE.. which makes the value 0 if it was null.  Mysql5 doesn't like inserting '' into integer columns.

Advertisement: