Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: bdtcomp on August 28, 2024, 01:14:01 PM

Title: Database Error in SMF 2.0.19
Post by: bdtcomp on August 28, 2024, 01:14:01 PM
Hi all. I know I should update to 2.1, and maybe this is the incentive. I don't have a lot of users and I think it would be cool to just have a retraining for it.

Today, though I got this error.

Table 'smf_messages' is marked as crashed and should be repaired
File: /home/bdtpro5/xxxxxxx/Sources/Subs-BoardIndex.php
Line: 70

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.19, while your database is at version 2.0.2. The above error might possibly go away if you execute the latest version of upgrade.php.

Okay I ran database repair as administrator and got topic #959 has the last message ID 47601, which is incorrect. Topic #859 has the wrong number of replies, 175

Then I ran again and see that our main thread has the error. In fact my post this morning is missing. My wife's right before is there.

After running the database repair again. I get the last message again, though now it read:

topic #959 has the last message ID 47601, which is incorrect. But the second line with the 175 replies is missing.

I went back to the thread and it is now there and I could post. But my message is missing and the message in red above tells me Warning: this topic has not been posted in for at least 120 days. Unless you're sure you want to replay, please consider starting a new topic.

I backed up the forum before I did maintenance and then at the end. I think only my post this morning it corrupt and missing. That's okay I can reenter.

I'm putting the forum into maintenance and my members are aware.

Thanks.
Title: Re: Database Error in SMF 2.0.19
Post by: Sir Osis of Liver on August 28, 2024, 01:18:00 PM
Run repair table in phpmyadmin.  There were no database changes from 2.0.2 to 2.0.19, you can ignore that error.
Title: Re: Database Error in SMF 2.0.19
Post by: Doug Heffernan on August 28, 2024, 01:44:38 PM
It's better to run the upgrader imo. Otherwise you will get that error quite often. The one about the database may require an upgrade.

Title: Re: Database Error in SMF 2.0.19
Post by: bdtcomp on August 28, 2024, 02:10:41 PM
Thanks Sir Osis & Doug. I did the repair. I then put a test post. I guess that was the only way to get rid of the message that it was an old thread.

Seems to work good. I'm going to backup more often until I do upgrade.

Title: Re: Database Error in SMF 2.0.19
Post by: Doug Heffernan on August 28, 2024, 04:58:01 PM
Glad to see that it has been sorted out. For future reference, it would be better imo to make a duplication of the main forum to a test folder/subdomain, and then perform the upgrade there first. Like that you will know what to expect for when you upgrade the main forum.
Title: Re: Database Error in SMF 2.0.19
Post by: bdtcomp on August 28, 2024, 06:00:44 PM
Thanks Doug. I just saw that the last post, which I read disappeared. Now it's possible our England person, who my wife WhatsApped accidently deleted. She checked, but now has retired for the night.

So, I am going to leave the forum up, with a note to copy before posting, as the post might disappear.

I will have to create a new separate database. I remember there is a webpage to enable.

I will need to search my old posts, last four years at most to figure out how to do this. I tried to do a search on my handle but didn't find all my posts?



Title: Re: Database Error in SMF 2.0.19
Post by: bdtcomp on August 28, 2024, 06:20:00 PM
I found all my old posts, so I'm searching for the 2.1 download page and will install in still another directory close to the copied forum. Then I can try to do the update in a test directory first.
Title: Re: Database Error in SMF 2.0.19
Post by: bdtcomp on August 28, 2024, 06:40:11 PM
Which 2.14 do I want? (Large Upgrade or Full Install). Our forum is 12 years old. So I see it's over a gigabyte (wow!) in size. The database is much, much smaller.

This below link I found looks useful to have handy for me.

https://www.simplemachines.org/community/index.php?topic=589611.0
Title: Re: Database Error in SMF 2.0.19
Post by: Kindred on August 28, 2024, 06:46:58 PM
You want the large upgrade...


But if you want to do a test first -- then you have to create a copy of your forum
Copy all the files to a new location
Copy the database
Run repair_settings.php to change the new test site to the new location and database. You'll have to run it twice to update the database first.

Then, and only then,  do the upgrade as listed in the faq
Title: Re: Database Error in SMF 2.0.19
Post by: Illori on August 28, 2024, 07:22:36 PM
Upgrading SMF (https://wiki.simplemachines.org/smf/Upgrading)
Title: Re: Database Error in SMF 2.0.19
Post by: bdtcomp on August 28, 2024, 08:52:47 PM
Thanks both of you. I copied the forum and will let the old forum run with a copy of the database.

I assume when I'm happy with the new version then just replace the database the current threads.

I assume I have to update the database to 2.1 first.

Then it should work. And I can work on customizing.
Title: Re: Database Error in SMF 2.0.19
Post by: Steve on August 29, 2024, 07:07:23 AM
Running the upgrader should upgrade the database for you.
Title: Re: Database Error in SMF 2.0.19
Post by: bdtcomp on August 29, 2024, 10:36:47 AM
Thanks. I'm now uploading my old forum to another directory, and then a new directory for the 2.1 version.
Title: Re: Database Error in SMF 2.0.19
Post by: Kindred on August 29, 2024, 11:04:52 AM
?????????


ummm.... no.

The 2.1 upgrade gets loaded ON TOP OF your installation.
The files in 2.1.x REPLACE all of the files in 2.0.x
Title: Re: Database Error in SMF 2.0.19
Post by: Illori on August 29, 2024, 11:51:57 AM
Quote from: bdtcomp on August 29, 2024, 10:36:47 AMThanks. I'm now uploading my old forum to another directory, and then a new directory for the 2.1 version.

if you are doing this for testing you need to copy your database to a new database and change your paths/urls and database to the new one.

What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php)
Title: Re: Database Error in SMF 2.0.19
Post by: bdtcomp on August 30, 2024, 09:50:40 PM
Ok, I see. Then I upload the forum, zip it and unzip it in new directory and upgrade on top of the 2.019 and then I could (theoretically) just go from there and run it. But I'm just going to test. Then if it works great, I will repeat this with the latest database backup and go from their, back in the old forum location.

Thank you.
Title: Re: Database Error in SMF 2.0.19
Post by: bdtcomp on September 02, 2024, 08:02:43 PM
Marking this closed again. Haven't updated yet. But the forum is working okay for now. I tell everyone to copy before posting.

I will update when my busy life isn't so busy. Hope soon.