Simple Machines Community Forum

SMF Support => Converting to SMF => IPB => Topic started by: Jacen on September 13, 2010, 02:27:21 AM

Title: Can I convert without the IPB installation?
Post by: Jacen on September 13, 2010, 02:27:21 AM
Okay, a great many years ago, sometime before IPB changed to a paid license, I had an IPB board that after a while, was left to rot, basically. Recently however, I've wanted to recover the board but it appears that the IPB files themselves are gone. The database is intact and viewable in phpmyadmin. The converter, when I try to convert the IPB board to SMF, wants the IPB installation however. Is there a way I can convert this board over to SMF without a IPB installation? (I think it was 1.3 or 2.0 beta, I'm not sure)

EDIT: To complicate the situation a little, the board appears to have been modded and I'm not sure which database columns and stuff do not belong :(
Title: Re: Can I convert without the IPB installation?
Post by: Norv on September 13, 2010, 04:13:40 AM
Yes, you can convert without an entire IPB installation. You need the database on the server, as you say it's there - so that's okay.
Also, you need to trick the converter a little bit, telling it a folder of your choice (could be the same with SMF's installation folder, even), where it expects to find an IPB configuration file. That's all it needs.

The configuration file should be named "conf_global.php", and it should contain (untested):

<?php
$INFO
['sql_database'] = "your_IPB_database_name";
$INFO['sql_tbl_prefix'] = "your_IPB_tables_prefix_if_any";
?>



For IPB 1.3, I think the converter named "invision_to_smf" should work. For IPB 2, invision2_to_smf, though you may have better chances (if there are further problems) with the latest 2.x converters too.
Title: Re: Can I convert without the IPB installation?
Post by: Jacen on September 13, 2010, 09:05:45 PM
I got an error when I tried that.

QuoteConverting members...
Notice: Undefined index: admin_group in /home/machaya/public_html/df/convert.php(1008) : eval()'d code on line 4
Unsuccessful!
This query:
SELECT
id AS ID_MEMBER, SUBSTRING(name, 1, 80) AS memberName,
joined AS dateRegistered, posts,
IF(mgroup = , 1, IF(mgroup > 5, mgroup + 3, 0)) AS ID_GROUP,
last_visit AS lastLogin, SUBSTRING(name, 1, 255) AS realName,
msg_total AS instantMessages, SUBSTRING(password, 1, 64) AS passwd,
SUBSTRING(email, 1, 255) AS emailAddress,
SUBSTRING(website, 1, 255) AS websiteTitle,
SUBSTRING(website, 1, 255) AS websiteUrl,
SUBSTRING(location, 1, 255) AS location,
SUBSTRING(icq_number, 1, 255) AS ICQ, signature,
IF (bday_year = 0 AND bday_month != 0 AND bday_day != 0, CONCAT('0004-', bday_month, '-', bday_day), CONCAT_WS('-', IF(bday_year <= 4, 1, bday_year), IF(bday_month = 0, 1, bday_month), IF(bday_day = 0, 1, bday_day))) AS birthdate,
SUBSTRING(aim_name, 1, 16) AS AIM, SUBSTRING(yahoo, 1, 32) AS YIM,
SUBSTRING(msnname, 1, 255) AS MSN, hide_email AS hideEmail,
SUBSTRING(IF(avatar = 'noavatar' OR INSTR(avatar, 'upload') > 0, '', avatar), 1, 255) AS avatar,
email_pm AS pm_email_notify, '' AS lngfile, '' AS buddy_list,
'' AS pm_ignore_list, '' AS messageLabels, '' AS personalText,
'' AS timeFormat, '' AS usertitle, '' AS memberIP, '' AS secretQuestion,
'' AS secretAnswer, '' AS validation_code, '' AS additionalGroups,
'' AS smileySet, '' AS passwordSalt, '' AS memberIP
FROM `machaya_df`.runeranger_members
WHERE id != 0
LIMIT 0, 500;
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 ' 1, IF(mgroup > 5, mgroup + 3, 0)) AS ID_GROUP,
last_visit AS lastLogin, SUBST' at line 4
Title: Re: Can I convert without the IPB installation?
Post by: Norv on September 14, 2010, 02:34:36 AM
You may need more settings in the configuration file mentioned above. Like, the $INFO['admin_group'] in IPB - it must have been a group ID of the administrator group.
Same for upload directory, board name, and a couple of others. If there's no way to recover / retrieve the original file, then please do continue to fill the new file you have now, with:

$INFO['admin_group'] = your_ipb_admin_group;
$INFO['hot_topic'] = number_of_posts_after_which_a_topic_is_considered_hot;
$INFO['display_max_posts'] = how_many_posts_to_display_per_topic_page;
$INFO['display_max_topics'] = how_many_topics_to_display_per_page;
$INFO['flood_control'] = waiting_time_before_trying_to_login_again;
$INFO['allow_online_list'] = who_online_list;
$INFO['board_name'] = your_forum_name;
$INFO['offline_msg'] = message_to_display_when_the_forum_is_in_maintenance_mode;
$INFO['upload_dir'] = directory_where_attachments_were_uploaded;

For admin_group, you could look in the database, at your user in members table (I assume your user is admin), and see the value of the mgroup column for it.
Title: Re: Can I convert without the IPB installation?
Post by: Jacen on September 14, 2010, 06:28:09 AM
Hmm... New error

QuoteConverting members... Unsuccessful!
This query:
SELECT
id AS ID_MEMBER, SUBSTRING(name, 1, 80) AS memberName,
joined AS dateRegistered, posts,
IF(mgroup = 4, 1, IF(mgroup > 5, mgroup + 3, 0)) AS ID_GROUP,
last_visit AS lastLogin, SUBSTRING(name, 1, 255) AS realName,
msg_total AS instantMessages, SUBSTRING(password, 1, 64) AS passwd,
SUBSTRING(email, 1, 255) AS emailAddress,
SUBSTRING(website, 1, 255) AS websiteTitle,
SUBSTRING(website, 1, 255) AS websiteUrl,
SUBSTRING(location, 1, 255) AS location,
SUBSTRING(icq_number, 1, 255) AS ICQ, signature,
IF (bday_year = 0 AND bday_month != 0 AND bday_day != 0, CONCAT('0004-', bday_month, '-', bday_day), CONCAT_WS('-', IF(bday_year <= 4, 1, bday_year), IF(bday_month = 0, 1, bday_month), IF(bday_day = 0, 1, bday_day))) AS birthdate,
SUBSTRING(aim_name, 1, 16) AS AIM, SUBSTRING(yahoo, 1, 32) AS YIM,
SUBSTRING(msnname, 1, 255) AS MSN, hide_email AS hideEmail,
SUBSTRING(IF(avatar = 'noavatar' OR INSTR(avatar, 'upload') > 0, '', avatar), 1, 255) AS avatar,
email_pm AS pm_email_notify, '' AS lngfile, '' AS buddy_list,
'' AS pm_ignore_list, '' AS messageLabels, '' AS personalText,
'' AS timeFormat, '' AS usertitle, '' AS memberIP, '' AS secretQuestion,
'' AS secretAnswer, '' AS validation_code, '' AS additionalGroups,
'' AS smileySet, '' AS passwordSalt, '' AS memberIP
FROM `machaya_df`.runeranger_members
WHERE id != 0
LIMIT 0, 500;
Caused the error:
Unknown column 'password' in 'field list'

Is it possible to skip the member conversion and create those later? (Or would that create additional problems)
Title: Re: Can I convert without the IPB installation?
Post by: Norv on September 14, 2010, 01:24:08 PM
Generally just about any step could be skipped, and done later...

However, it says "unknown column 'password'" - meaning that the structure of the database doesn't seem to be what the converter expects. Perhaps it's not the right version of the converter? Which one are you trying?
Title: Re: Can I convert without the IPB installation?
Post by: Jacen on September 14, 2010, 07:09:09 PM
I'm trying the second one from the bottom on the invision conversion page (Since I think it's a IPB 1.3 database and my version of SMF is 1.1.11)

Should I try the invision 2.0 one? I think it's 1.3 but I could be wrong as it's been a while lol
Title: Re: Can I convert without the IPB installation?
Post by: Norv on September 14, 2010, 07:53:57 PM
IMHO it won't really hurt to try the one for version 2. It should do nothing to your IPB database, just try to read it and import it into SMF's, and succeed or not.

About the error again though, you could also: login in phpmyadmin, select the members table from IPB (runeranger_members) and export its structure: hit Export, and please make sure to choose structure only, and save into a file. Then, you could attach that file here.
Please make sure it's structure only (no data), so the resulting file will not contain anything confidential, but we could see the table structure - it could help if the problem is trivial and there aren't more.
Title: Re: Can I convert without the IPB installation?
Post by: Jacen on September 14, 2010, 10:19:25 PM
I assume this is what you wanted. It's only 1KB in size, So I assume I exported it correctly.
Title: Re: Can I convert without the IPB installation?
Post by: Norv on September 15, 2010, 09:49:09 AM
Yes, thank you.

Please, try the invision2_to_smf converter, instead (even other 2.x converters). It does look to me like the table structure is actually the one from IPB 2...
Title: Re: Can I convert without the IPB installation?
Post by: Jacen on September 15, 2010, 10:31:53 AM
Thank you Norv! It worked almost perfectly :P I'm assuming from the errors that it generated that the only thing it couldn't do was the attachments which were lost anyway.

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... Successful.
Converting poll logs... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting personal messages (step 3)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting moderators... Successful.
Converting yearly events... Successful.
Converting permissions... Successful.
Converting board permissions... Successful.
Converting smileys... Successful.
Converting settings... Successful.
Converting attachments...
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/jacensol/public_html/runeranger/rpg/uploads) is not within the allowed path(s): (/home/machaya:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 12

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1119627493.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120022798.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120022931.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120022958.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120022991.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120023049.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120023259.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120023281.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120024361.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120024535.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120307167.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120307203.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120433330.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-1-1121725395.ipb) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-1-1121733329.ipb) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120433419.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-1-1120535771.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-1-1120536083.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-1-1120536850.gif) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-2-1120537055.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-1-1121209530.gif) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-1-1121740348.ipb) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21

Warning: copy(/home/machaya/public_html/ipb/uploads/post-1-1121753325.ipb) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 21
Successful.
Converting user avatars...
Notice: Undefined variable: oldAvatarDir in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 58

Warning: copy(/av-3.jpg) [function.copy]: failed to open stream: No such file or directory in /home/machaya/public_html/df/convert.php(1109) : eval()'d code on line 59
Successful.
Recalculating forum statistics... Successful.

But... the posts and forums appear to be here, so all appears to be well. Thank you :)

/beer :D
Title: Re: Can I convert without the IPB installation?
Post by: Norv on September 15, 2010, 10:44:48 AM
Yes, it does appear that attachments not found caused these.

Hey, it's great to hear it worked! Eventually, you may want to make sure to run Maintenance on the new forum, just to make sure that it recalculates statistics fine and so on.