[SMF Converter] PHP-Fusion 7

Started by ThorstenE, February 21, 2009, 02:08:44 PM

Previous topic - Next topic

Gold1s

Now it's working!
Really big thanx to you Thorsten Eurich!
Greetz bro!


ThorstenE

mhh, sounds like there's a duplicate topic id ..

in phpfusion7_to_smf.sql find:
Code (find) Select
---* {$to_prefix}topics
add after:
Code (add after) Select

---{
$ignore = true;
---}

then rerun the converter.

ChandlerBing

Great thanks - the conversion worked!

Now I just have to be able to login "Password security has recently been upgraded. Please enter your password again."

I ran the login-fix from the first post before convertering - didn't help :)

Any ideas?

ThorstenE

Quote from: ChandlerBing on September 13, 2012, 09:26:27 AM
Now I just have to be able to login "Password security has recently been upgraded. Please enter your password again."
Do you get this message more than once? IIRC you should get this message during the first login only..

ChandlerBing

Quote from: Thorsten Eurich on September 13, 2012, 09:51:23 AM
Quote from: ChandlerBing on September 13, 2012, 09:26:27 AM
Now I just have to be able to login "Password security has recently been upgraded. Please enter your password again."
Do you get this message more than once? IIRC you should get this message during the first login only..

Yes, I get it until I reach the authentication reminder.

ThorstenE

ok, checked the phpfusion7 source code and AFAICS they've changed the password authentication mechanism completely.  Maybe I can work on a login fix during the next days but you'd have to re-convert the forum because some important data is missing.

Their new password structure is based on three database rows (user_algo, user_salt and user_password) but the converter currently covers only 'user_salt' and 'user_password'.

ChandlerBing

Fantastic.

Until now I've just tested the converter on a wamp-server so I can wait :)

ThorstenE

here we go ;) please use the attached version..

Login fix:
in Sources/LogInOut.php find:
Code (find) Select
// Whichever encryption it was using, let's make it use SMF's now ;).

add before:
Code (add before) Select
$other_passwords[] = hash_hmac('sha256', $_POST['passwrd'], $user_settings['password_salt']);

ChandlerBing

I never got around to this but the solution worked!

Thanks for your help! :)

kvjn777

Has this been updated? I have PHP-Fusion version   7.02.05. I have never done anything remotely like this so i may have a lot of questions

kvjn777

ok i done everything the wiki said, and i got this in the end.

Converting members... Unsuccessful!
This query:

    SELECT
    user_id AS id_member, SUBSTRING(user_name, 1, 80) AS member_name,
    user_joined AS date_registered, user_posts AS posts, SUBSTRING(user_password, 1, 64) AS passwd,
    SUBSTRING(user_web, 1, 255) AS website_title,
    SUBSTRING(user_web, 1, 255) AS website_url, user_lastvisit AS last_login,
    user_birthdate AS birthdate, SUBSTRING(user_icq , 1, 255) AS icq,
    SUBSTRING(user_name, 1, 255) AS real_name,
    '' AS lngfile,
    SUBSTRING(user_email, 1, 255) AS email_address,
    SUBSTRING(user_aim, 1, 16) AS aim,
    '' AS personal_text,
    user_hide_email AS hide_email, SUBSTRING(user_ip , 1, 255) AS member_ip,
    SUBSTRING(user_ip , 1, 255) AS member_ip2,
    SUBSTRING(user_yahoo, 1, 32) AS yim, 0 AS gender,
    SUBSTRING(user_msn, 1, 255) AS msn,
    SUBSTRING(REPLACE(user_sig, '<br>', '<br />'), 1, 65534) AS signature,
    SUBSTRING(user_location, 1, 255) AS location, user_offset AS time_offset,
    SUBSTRING(user_avatar, 1, 255) AS avatar,
    '' AS usertitle, 0 AS pm_email_notify, 0 AS karma_bad, 0 AS karma_good,
    0 AS notify_announcements, '' AS secret_question, '' AS secret_answer,
    IF(user_level = 103, 1, 0) AS id_group, '' AS buddy_list, '' AS pm_ignore_list,
    '' AS message_labels, '' AS validation_code, user_groups AS additional_groups,
    '' AS smiley_set, '' AS password_salt
    FROM `ammweb`.fusion33K28_users
    LIMIT 0, 500;

Caused the error:

    Unknown column 'user_icq' in 'field list'

smirre

Hello everyone I got stuck at members to :)
My version of php-fusion: 7.02.04

Converting members...
Unsuccessful!
This query:
SELECT
user_id AS id_member, SUBSTRING(user_name, 1, 80) AS member_name,
user_joined AS date_registered, user_posts AS posts, SUBSTRING(user_password, 1, 64) AS passwd,
SUBSTRING(user_web, 1, 255) AS website_title,
SUBSTRING(user_web, 1, 255) AS website_url, user_lastvisit AS last_login,
user_birthdate AS birthdate, SUBSTRING(user_icq , 1, 255) AS icq,
SUBSTRING(user_name, 1, 255) AS real_name,
'' AS lngfile,
SUBSTRING(user_email, 1, 255) AS email_address,
SUBSTRING(user_aim, 1, 16) AS aim,
'' AS personal_text,
user_hide_email AS hide_email, SUBSTRING(user_ip , 1, 255) AS member_ip,
SUBSTRING(user_ip , 1, 255) AS member_ip2,
SUBSTRING(user_yahoo, 1, 32) AS yim, 0 AS gender,
SUBSTRING(user_msn, 1, 255) AS msn,
SUBSTRING(REPLACE(user_sig, '<br>', '<br />'), 1, 65534) AS signature,
SUBSTRING(user_location, 1, 255) AS location, user_offset AS time_offset,
SUBSTRING(user_avatar, 1, 255) AS avatar,
'' AS usertitle, 0 AS pm_email_notify, 0 AS karma_bad, 0 AS karma_good,
0 AS notify_announcements, '' AS secret_question, '' AS secret_answer,
IF(user_level = 103, 1, 0) AS id_group, '' AS buddy_list, '' AS pm_ignore_list,
'' AS message_labels, '' AS validation_code, user_groups AS additional_groups,
'' AS smiley_set, '' AS password_salt
FROM `thesnakepit_se`.fusionl7r3A_users
LIMIT 0, 500;
Caused the error:
Unknown column 'user_sig' in 'field list'


First I thought it could be from some code for showing "online/offline/ingame - status" from members using Steam,
but Im not sure. I don´t recognize the column.  :-\ If you can help me with this one I would really appreciate your help!

Many regards

Smirre

mentalist

remove SUBSTRING(REPLACE(user_sig, '<br>', '<br />'), 1, 65534) AS signature, from phpfusion7_to_smf.sql and try again.

smirre

Quote from: Dexter Morgan on November 28, 2013, 04:39:06 AM
remove SUBSTRING(REPLACE(user_sig, '<br>', '<br />'), 1, 65534) AS signature, from phpfusion7_to_smf.sql and try again.

Thank you so much! It worked perfect!  :D

//Smirre

szoller

Hello,
excuse me for using this old topic, but I guess my issue fits here.

I'm trying to migrate an old PHP Fusion 7.02 board to SMF, it runs fine (as long as I do not click "Continue" and just let the converter do it's stuff :D), but when I arrive to attachment, I experience an issue that brings the process to stop:

Converting posts (this may take some time)...
Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting attachments...The database value you're trying to insert does not exist: id_attach


In the apache error log I see the following message a lot of times:
PHP message: PHP Warning:  A non-numeric value encountered in /var/www/vhosts/PAGENAME/httpdocs/smf/convert.php(1270) : eval()'d code on line 4

The converter.php contains the following, line 1270 highlighted bold:

while ($row = convert_fetch_assoc($special_result))
{
if ($special_code !== null)
[b] eval($special_code);[/b]

// Here we have various bits of custom code for some known problems global to all converters.
if ($special_table == $to_prefix . 'members')
{
// Let's ensure there are no illegal characters.
$row['member_name'] = preg_replace('/[<>&"\'=\\\]/is', '', $row['member_name']);
$row['real_name'] = trim($row['real_name'], " \t\n\r\x0B\0\xA0");

if (strpos($row['real_name'], '<') !== false || strpos($row['real_name'], '>') !== false || strpos($row['real_name'], '& ') !== false)
$row['real_name'] = htmlspecialchars($row['real_name'], ENT_QUOTES);
else
$row['real_name'] = strtr($row['real_name'], array('\'' => '&#039;'));
}


The converter is the official one from the Download area.

Does anyone have an Idea?

Thanks a lot

Sebastian

szoller

Maybe the log messages above are not the reason for the stop of the process, i found another message:

[Thu Jan 16 12:41:37.021802 2020] [proxy_fcgi:error] [pid 21194:tid 140038499145472] [client 212.18.198.162:33686] AH01071: Got error 'PHP message: PHP Warning:  array_combine(): Both parameters should have an equal number of elements in /var/www/vhosts/PAGENAME/httpdocs/smf/Sources/Subs-Db-mysql.php on line 1497', referer: https://PAGENAME/smf/convert.php?step=1&substep=9&start=96200

After the convert process stops, there has no entry been inserted to the _attachments table of SMF, around 500 files have been created in attachments directory on the server.

szoller

Another try (can't I edit posts here?):

I used the latest converter files from Github, now all ( i guess) 10 000 files are transferred to the attachments folder, but in the database there are only sometimes 2 attachment entries, sometimes 5 or 10.

After the attachments-converting, i receive the following message:

Converting attachments...
Successful.
Converting membergroups... Successful.
Recalculating forum statistics... Unsuccessful!
This query:

    UPDATE `tda_smf`.qpx_topics
    SET id_first_msg = '101154',
    id_member_started = '4973', id_last_msg = '101162',
    id_member_updated = '75', num_replies = '6'
    WHERE id_topic = 6982
    LIMIT 1;

Caused the error:

    1062


So there seems also another problem. I really would appreciate some help :) I'm lost

vbgamer45

We do not allow editing of posts after a few minutes on the forum.
Can you run the query via mysql such as phpmyadmin

UPDATE `tda_smf`.qpx_topics
    SET id_first_msg = '101154',
    id_member_started = '4973', id_last_msg = '101162',
    id_member_updated = '75', num_replies = '6'
    WHERE id_topic = 6982
    LIMIT 1;
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: