Converting large Snitz to SMF problem

Started by webbouk, March 17, 2018, 12:47:06 PM

Previous topic - Next topic

webbouk

Hi all, new here so be gentle on me :)

I'm trying to convert an 16 year old large Snitz forum to SMF 2.0.15 and have successfully installed the forum software, but when it comes to converting the Snitz MySQL database it hangs at 'Converting members...'

I ran the conversion script from the SMF downloads page last night for over 12 hours via a browser and it hung at that point, I've also tried running directly on the server (got our own dedicated servers) and it still hangs at the same point.

I've checked the SMF database on the server and nothing has been added to the database so it appears nothing is happening in the background.

Has anyone any ideas or suggestions as I'd really like to get changed over?

Regards

kerryww

Quote from: webbouk on March 17, 2018, 12:47:06 PM

I'm trying to convert an 16 year old large Snitz forum to SMF 2.0.15 and have successfully installed the forum software, but when it comes to converting the Snitz MySQL database it hangs at 'Converting members...'


I'm in the same boat as you, my Snitz forum which I'm trying to convert to SMF is also around 16 years old.

I tried the conversion and all I can get after 12hours wait is:
Converting...
Successful.
Recalculating forum statistics.

Here's the error log:
[28-Mar-2018 03:04:58] PHP Notice:  Undefined index:  convert_script in /home/orientbeachforum/public_html/convert.php on line 972
[28-Mar-2018 03:04:58] PHP Warning:  Invalid argument supplied for foreach() in /home/orientbeachforum/public_html/convert.php on line 975
[28-Mar-2018 03:04:58] PHP Notice:  Undefined index:  convert_script in /home/orientbeachforum/public_html/convert.php on line 987
[28-Mar-2018 03:04:58] PHP Notice:  Undefined variable:  result in /home/orientbeachforum/public_html/convert.php on line 2494
[28-Mar-2018 03:04:58] PHP Notice:  Undefined variable:  result in /home/orientbeachforum/public_html/convert.php on line 2495
[28-Mar-2018 03:04:58] PHP Notice:  Undefined index:  db_fetch_assoc in /home/orientbeachforum/public_html/convert.php on line 1386
[28-Mar-2018 03:04:58] PHP Fatal error:  Call to undefined function: () in /home/orientbeachforum/public_html/convert.php on line 1386
[28-Mar-2018 03:12:13] PHP Parse error:  syntax error, unexpected T_FUNCTION, expecting ')' in /home/orientbeachforum/public_html/index.php on line 114


I installed SMF using PHP 5.6 but swapped over to PHP 4.4 to do the conversion. I can't even get the conversion to start using PHP 5.6.

The site is at 107.161.82.130/~orientbeachforum/convert.php?step=1

TIA if anyone has any ideas on where to start finding a solution.

vbgamer45

Can you post the the convertor files that are you are using here.

I would use SMF 2.0.15 with PHP 5.6 I would not even attempt with any PHP 4 version.
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

kerryww

#3
Thanks for your help - much appreciated!

I'm using SMF_2-0-15 and SMF_2-0_snitz_converter.

I changed the PHP version to 5.6 (Native).

I tried to run the script again and getting:
Converting...
Successful.
Recalculating forum statistics...

I checked the error_log and found the following:
[28-Mar-2018 22:13:30 UTC] PHP Notice:  Undefined index: convert_script in /home/orientbeachforum/public_html/convert.php on line 972
[28-Mar-2018 22:13:30 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/orientbeachforum/public_html/convert.php on line 975
[28-Mar-2018 22:13:30 UTC] PHP Notice:  Undefined index: convert_script in /home/orientbeachforum/public_html/convert.php on line 987
[28-Mar-2018 22:13:30 UTC] PHP Notice:  Undefined variable: result in /home/orientbeachforum/public_html/convert.php on line 2494
[28-Mar-2018 22:13:30 UTC] PHP Notice:  Undefined variable: result in /home/orientbeachforum/public_html/convert.php on line 2495
[28-Mar-2018 22:13:30 UTC] PHP Notice:  Undefined index: db_fetch_assoc in /home/orientbeachforum/public_html/convert.php on line 1386
[28-Mar-2018 22:13:30 UTC] PHP Fatal error:  Function name must be a string in /home/orientbeachforum/public_html/convert.php on line 1386


I also tried PHP 5.6 by itself (no native) It gives the following error and can't find the database.
[28-Mar-2018 21:08:13 UTC] PHP Warning:  mysqli_error() expects exactly 1 parameter, 0 given in /home/orientbeachforum/public_html/convert.php on line 469

Thanks again

vbgamer45

I am going to say try installing SMF 2.0.13 and run the convertor. There were some changes to mysqli from mysql give that a shot.
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

kerryww

Quote from: vbgamer45 on March 28, 2018, 07:36:36 PM
I am going to say try installing SMF 2.0.13 and run the convertor. There were some changes to mysqli from mysql give that a shot.

I reinstalled SMF with SMF 2.0.13 but no love. The first error  stated:
The error that was received from the Database was: SELECT command denied to user 'orientbeachforum_one'@'localhost' for table 'FORUM_MEMBERS'
I checked in cPanel and the ALL PRIVILEGES box was ticked, so I'm  confused on what could be the cause of that error.
The table is in the database, so I changed it from lower case forum_members to upper case FORUM_MEMBERS. But no love here either. I'm now getting the error Unknown system variable 'SQL_MAX_JOIN_SIZE'
I did a search and came up with this:
https://www.simplemachines.org/community/index.php?topic=528263.0 
But no love or solution here either as the link to a solution has disappeared.

I then went back in and changed FORUM_MEMBERS back to forum_members. Now I get this error:
Sorry, the database connection information used in the specified installation of SMF cannot access the installation of Snitz Forums. This may either mean that the installation doesn't exist, or that the Database account used does not have permissions to access it.
The error that was received from the Database was: Table 'orientbeachforum_yhivpzri_r.FORUM_MEMBERS' doesn't exist

I also tried using PHP 5.3 but no love there either.

I've read through all the other posts on Snitz to SMF conversions but can't find a solution.

Any other suggestions are much appreciated. I've been trying to convert this Snitz forum for over a year now. I've tried numerous other systems but all have ended in total failure.

Thanks for your help!



vbgamer45

Well that is a different issue. I think you need to make sure you add that database user to both databases the smf database and the sntiz forum so it has permission to access both.
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

kerryww

Quote from: vbgamer45 on March 29, 2018, 08:56:57 AM
Well that is a different issue. I think you need to make sure you add that database user to both databases the smf database and the sntiz forum so it has permission to access both.

I've tried that three times creating a new user and adding it to the databases, but no luck.

Actually, I did a complete reinstall of SMF, again. But still getting:
The error that was received from the Database was: Table 'orientbeachforum_yhivpzri_r.FORUM_MEMBERS' doesn't exist

I now seem to be just going around in circles.  Time for a change, I'll start from the beginning. But first a few questions:

Had anyone here ever succeeded in using the script to convert Snitz to SMF ?

If you've succeeded can you answer a few questions.

1. What version of SMF did you use? (The script suggests version 2.0)
2. What version of PHP did you use? (The script suggests version 4.1.0)
3.What version of MySQL? (The script suggests 4.0.18)
4. What version of Snitz?
5. Am I missing any changes to the script like TYPE=MyISAM; to ENGINE=MyISAM;

With this info, I will download and install a new copy of Snitz, create a MYSQL DB for it and start a test run converting it to a clean SMF install. All from the very beginning.

Now, if doing it that way doesn't work, nothing will and I will give up and go join the Hare Krishnas :(

As always, thanks for your help.


kerryww

Just an update.

I'm still trying. I changed the forum_members table from INNOdb to MyISAM.

Of course it still doesn't work but I'm now getting the following error:
Converting...
Converting members...Wrong value type sent to the database. Integer expected. (hide_email)

I also set PHP to PHP4.4 and get the following error:
Converting...
Converting members...

The members did get carried over to the new database - but nothing else :(

I also tried PHP5.3 but get
Converting...
Converting members...Wrong value type sent to the database. Integer expected. (hide_email)

The nightmare continues...

GigaWatt

Quote from: kerryww on March 30, 2018, 02:22:43 AM
Converting members...Wrong value type sent to the database. Integer expected. (hide_email)

Have you checked this particular column in the members table? Do any of the members have any other value than a number in it?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

kerryww

Thanks for your help.

The forum-members table has a field (column) named M_HIDE_EMAIL  with either a "0" or "NULL"


GigaWatt

Quote from: kerryww on March 31, 2018, 04:50:08 AM
The forum-members table has a field (column) named M_HIDE_EMAIL  with either a "0" or "NULL"

"0" meaning "don't hide my email" and "NULL" meaning... ???. Basically, it means the same thing, except the first is expressed with an integer and the second with a string. There should also be a "third" scenario, a "1" integer value for "yes, please hide my email" ;).

In any case, this might be the problem. The converter is expecting an integer in that column and instead, it finds a string (NULL). Backup the database as it is, change every "NULL" value in that column to "0" and try to convert the database again ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

kerryww

Thanks for your help - fantastic and much appreciated.

I did an SQL query and changed the "NULL"  to "0" - it worked. It took me about 5 attempts get the query correct but finally got it right and bingo!

Now i have the following error when I continue the conversion..

Converting...
Converting members... Successful.
Preparing Conversion (part 1)...Wrong value type sent to the database. Integer expected. (old_id_topic)


I'm lost here as I've done a search on both databases for "old_id_topic" and can't find any reference to either "old_id_topic" or even "id_topic" in either the Snitz database or the SMF database. Both searches throw up "0 matches in..." both searches.

I see reference to "old_id_topic" in the snitz_to_smf'.sql file but I'm not the PhP expert I wish I was.

Any hint on where to proceed next would be much appreciated.

Again, thanks for your help.

GigaWatt

So, you can't see any column in any of the tables with the name "old_id_topic" ???. Odd, it looks like the SMF converter locates it, but, again, there is something in it that the converter doesn't like.

I would try and manually search (by looking :D) in some of the tables that might be associated with that column, for example the messages column or maybe some tables associated with the messages in the logs tables.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

kerryww

I did a search of the Snitz database, then went and looked around the tables, but can't find anything like "old_id_topic"

I also did a search in the SMF database and found no mention of "old_id_topic"

Not sure where to proceed next..

Thanks for your help and suggestions.


Search results for "old_id_topic" at least one of the words:0 matches in forum_active_users       
0 matches in forum_album_favorites       
0 matches in forum_album_reply       
0 matches in forum_allowed_members       
0 matches in forum_announce       
0 matches in forum_avatar       
0 matches in forum_avatar_category       
0 matches in forum_avatar_extension       
0 matches in forum_a_reply       
0 matches in forum_a_topics       
0 matches in forum_badwords       
0 matches in forum_cal_events       
0 matches in forum_category       
0 matches in forum_complaints       
0 matches in forum_config_new       
0 matches in forum_custom_policy       
0 matches in forum_forum       
0 matches in forum_gb_options       
0 matches in forum_groups       
0 matches in forum_group_names       
0 matches in forum_guestbook       
0 matches in forum_iplist       
0 matches in forum_iplog       
0 matches in FORUM_MEMBERS       
0 matches in forum_members_pending       
0 matches in forum_moderator       
0 matches in forum_namefilter       
0 matches in forum_pagekeys       
0 matches in forum_pm       
0 matches in forum_polls       
0 matches in forum_poll_votes       
0 matches in forum_reply       
0 matches in forum_smiles       
0 matches in forum_smiles2       
0 matches in forum_smiles_custom       
0 matches in forum_spam_mail       
0 matches in forum_subscriptions       
0 matches in forum_topics       
0 matches in forum_totals       
0 matches in forum_ua_topics

GigaWatt

Try searching "id_topic" or "topic_id"... maybe even just "id", but only in "forum_topics", "forum_reply", "forum_a_reply" and "forum_a_topics". These tables should hold an ID value column that somewhere in it has one or more entries that are not integer. Try to find a query that returns all values in a particular column that aren't integer.

Just so you know what you're looking for, there probably isn't an entry with a string value. The script might have entered a value that the database engine interprets as a decimal value. For example, the topic ID of this thread is 559384, but if you load the thread, the thread ID shows up in the address bar as 559384.0. This might be the reason the converter nags. The script might have saved the topic ID with a .0 (load the first page) instead of just saving the topic ID. Try searching for "*.*" in the ID columns in those tables and see what the search returns ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

kerryww

It appears that a table named smf_convert needed to be created in the SMF directory. Below is the code in the snitz_to_smf.sql file.

Why it failed to be created may be due to the fact that the db engine is Maria instead of MySQL. Anyhow, I uploaded the sql and the table was created.

I then ran the convert.php file again and the table smf_convert  filled with 800 enteries. But, I'm still getting the error :
Converting...
Converting members... Successful.
Preparing Conversion (part 1)...Wrong value type sent to the database. Integer expected. (old_id_topic)


I've searched/checked/looked for anything that is not an integer in the topic, message and date columns in the relevant tables but they're all integers.


    CREATE TABLE IF NOT EXISTS `orientbeachforum_smf`.smf_convert (
    old_id_topic int(10) unsigned NULL default '0',
    old_id_msg int(10) unsigned NULL default '0',
    msg_date bigint(20) unsigned NULL default '0',
    type varchar(80) NOT NULL default ''
    ) ENGINE=MyISAM;

Any suggestions much appreciated. TIA


GigaWatt

Is there a "topic_id" column (or maybe just "id") in the table that contains the topics of the forum (probably "forum_topics")? What does the table "forum_a_topics" contain?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

kerryww

CREATE TABLE `forum_topics` (
  `CAT_ID` int(10) DEFAULT NULL,
  `FORUM_ID` int(10) DEFAULT NULL,
  `TOPIC_ID` int(10) NOT NULL,
  `T_STATUS` smallint(5) DEFAULT NULL,
  `T_MAIL` smallint(5) DEFAULT NULL,
  `T_SUBJECT` varchar(100) DEFAULT NULL,
  `T_MESSAGE` longtext,
  `T_AUTHOR` int(10) DEFAULT NULL,
  `T_REPLIES` int(10) DEFAULT NULL,
  `T_UREPLIES` int(10) DEFAULT NULL,
  `T_VIEW_COUNT` int(10) DEFAULT '0',
  `T_LAST_POST` varchar(14) DEFAULT NULL,
  `T_DATE` varchar(14) DEFAULT NULL,
  `T_LAST_POSTER` int(10) DEFAULT NULL,
  `T_IP` varchar(15) DEFAULT NULL,
  `T_LAST_POST_AUTHOR` int(10) DEFAULT NULL,
  `T_LAST_POST_REPLY_ID` int(10) DEFAULT NULL,
  `T_ARCHIVE_FLAG` int(10) DEFAULT NULL,
  `T_LAST_EDIT` varchar(14) DEFAULT NULL,
  `T_LAST_EDITBY` int(10) DEFAULT NULL,
  `T_STICKY` smallint(5) DEFAULT NULL,
  `T_SIG` smallint(5) DEFAULT NULL,
  `T_MSGICON` int(10) DEFAULT NULL,
  `T_ISPOLL` int(10) DEFAULT NULL,
  `T_POLLSTATUS` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `forum_a_topics` (
  `CAT_ID` int(10) DEFAULT NULL,
  `FORUM_ID` int(10) DEFAULT NULL,
  `TOPIC_ID` int(10) DEFAULT NULL,
  `T_STATUS` smallint(5) DEFAULT NULL,
  `T_MAIL` smallint(5) DEFAULT NULL,
  `T_SUBJECT` varchar(100) DEFAULT NULL,
  `T_MESSAGE` longtext,
  `T_AUTHOR` int(10) DEFAULT NULL,
  `T_REPLIES` int(10) DEFAULT NULL,
  `T_UREPLIES` int(10) DEFAULT NULL,
  `T_VIEW_COUNT` int(10) DEFAULT NULL,
  `T_LAST_POST` varchar(14) DEFAULT NULL,
  `T_DATE` varchar(14) DEFAULT NULL,
  `T_LAST_POSTER` int(10) DEFAULT NULL,
  `T_IP` varchar(15) DEFAULT NULL,
  `T_LAST_POST_AUTHOR` int(10) DEFAULT NULL,
  `T_LAST_POST_REPLY_ID` int(10) DEFAULT NULL,
  `T_LAST_EDIT` varchar(14) DEFAULT NULL,
  `T_LAST_EDITBY` int(10) DEFAULT NULL,
  `T_STICKY` smallint(5) DEFAULT NULL,
  `T_SIG` smallint(5) DEFAULT NULL,
  `T_MSGICON` int(10) DEFAULT NULL,
  `T_ISPOLL` int(10) DEFAULT NULL,
  `T_POLLSTATUS` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



GigaWatt

Quote from: kerryww on April 03, 2018, 11:04:29 PM
CREATE TABLE `forum_topics` (
...
  `TOPIC_ID` int(10) NOT NULL,
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
...

CREATE TABLE `forum_a_topics` (
...
  `TOPIC_ID` int(10) DEFAULT NULL,
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

These two might be the culprits. Check if any of the values in these two columns contain anything else other than an integer. These links might give you a hint on how to check ;).

http://stackoverflow.com/questions/75704/how-do-i-check-to-see-if-a-value-is-an-integer-in-mysql

http://www.mssqltips.com/sqlservertip/4799/validate-integer-and-decimal-values-in-sql-server/
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Advertisement: