Advertisement:

Author Topic: HELP! Can't log in after conversion  (Read 4327 times)

Offline Sarke

  • Jr. Member
  • **
  • Posts: 315
HELP! Can't log in after conversion
« on: January 06, 2007, 12:04:07 PM »
I'm converting from IPB2 PF3 and I ran into a couple of problems.

The first one is major. After the conversion I can't log in anymore. Things I think are relevant to the problem are that I setup SMF with the same name and password as I have in the IPB install, and I had set the SMF forum to maintenance mode before the conversion. No idea what the problem is, but I speculate that it has something to do with the MD5s that the forums use to authenticate. SMF I think use only one, while IPB store "legacy_password" and "converge_pass_hash". The latter was what ended up in the SMF db.

The second problem is minor, but annoying. There was a query error when converting the polls, but I just skipped to the next step since this was just a trial convert to see how it all goes.


Please help as I want to make the move to SMF.
My MODs          Please don't PM me for support, post in the appropriate topic.

Offline Sarke

  • Jr. Member
  • **
  • Posts: 315
query error in IPB2 converter
« Reply #1 on: January 06, 2007, 04:39:24 PM »
More info on the second problem. It's step 1, substep 13 (poll choices).  The query looks like this:

Code: [Select]
INSERT INTO `vancou2_smf`.smf_sf_poll_choices
(ID_POLL, ID_CHOICE, label, votes)
VALUES (1, SUBSTRING('0', 1, 255), 'Looks good', 1, 255), '6'),
(1, SUBSTRING('1', 1, 255), 'Awesome', 1, 255), '7'),

[...]

(77, SUBSTRING('4', 1, 255), 'No. I think the campaign is stupid.', 1, 255), '1');

I've removed some of the lines inbetween, hence the "[...]".  The error:

Code: [Select]
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 ''6'),
(1, SUBSTRING('1', 1, 255), 'Awesome', 1, 255), '7'),
(1, ' at line 3

What I see is that there is one too many closing brackets per row after VALUES.  My guess is that

Code: [Select]
(1, SUBSTRING('1', 1, 255), 'Awesome', 1, 255), '7'),
should be

Code: [Select]
(1, SUBSTRING('1', 1, 255), SUBSTRING('Awesome', 1, 255), '7'),
The part that controls that in convert.php is around line 840 to 845 and in invision2_to_smf.sql around line 224.  I'm using the "Invision 2 Converter" from http://www.simplemachines.org/download/?converters .
My MODs          Please don't PM me for support, post in the appropriate topic.

Offline Sarke

  • Jr. Member
  • **
  • Posts: 315
Re: query error in IPB2 converter
« Reply #2 on: January 06, 2007, 04:49:21 PM »
Fixed the second problem!

in invision2_to_smf.sql around line 224, replace

Code: [Select]
$rows[] = "$row[ID_POLL], SUBSTRING('" . implode("', 1, 255), '", $choice) . "'";
with

Code: [Select]
$rows[] = "$row[ID_POLL], SUBSTRING('" . implode("', 1, 255), SUBSTRING('", $choice) . "', 1, 255)";

I'd like to thank my audience.  ;D

Now onto the first problem...
My MODs          Please don't PM me for support, post in the appropriate topic.

Offline Sarke

  • Jr. Member
  • **
  • Posts: 315
Re: HELP! Can't log in after conversion
« Reply #3 on: January 06, 2007, 05:41:03 PM »
After redoing everything fresh, and fixing the above problem, I managed to at least get in on the board since it wasn't in Maintenance Mode this time around I was able to reset my password.  I wouldn't want all my members to have to do this though.

I set it to the same password again, but the new "passwd" in SMF is different from any of legacy_password", "member_login_key", or "converge_pass_hash" (the one that was copied by the converter).  It's 40 characters long, so I'm guessing it's a SHA1 but it's not a SHA1 of my password.  I'm guessing it is the password plus some member info thrown in.

Since IPB2 and SMF use different pass hashes, and neither saves the original password, am I correct in assuming that there's no way of converting one to the other?

What about copying the "member_login_key" instead (the one that is saved in the IPB2 cookie), and when a users comes to the new board for the first time the board check the saved key to the member key and if they match the user is promted to enter a new (or the same) password and SMF can create the SHA1 hash that it uses.
My MODs          Please don't PM me for support, post in the appropriate topic.

chickendippers

  • Guest
Re: HELP! Can't log in after conversion
« Reply #4 on: January 17, 2007, 12:11:12 PM »
Thanks Sarke, I had the same problem converting the poll choices and your solution worked for me :)