Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Plantje on July 19, 2020, 01:23:56 PM

Title: Database error
Post by: Plantje on July 19, 2020, 01:23:56 PM
My forum has been running just fine for quite a while. I have moved to 2.0.15 somewhere October 2019.

Now today I got the following error:
Quote
Database Error
Can't find record in 'smforum_log_online'
File: /customers/3/2/5/vliegvissers.com/httpd.www/SMForum/Sources/Subs.php
Line: 2840

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, 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.

This is my forum URL: https://www.vliegvissers.com/SMForum/index.php

I checked the configuration on the host (one.com) and the database seems to be up and running. I can run "upgrade.php", I think.... need to look into that. But why is this happening all of a sudden? And is there another solution?
Title: Re: Database error
Post by: Shambles on July 19, 2020, 01:59:27 PM
If it were my forum I'd just truncate that table and be done with it.
Title: Re: Database error
Post by: Plantje on July 19, 2020, 02:05:57 PM
Just had a chat with One.com:
Quote
Michael S
As per checking, the issue is mainly due to the CMS used for your site which is outdated. Our technical team can see that you are still using set_magic_quotes_runtime which is not supported (files are still dated way back 2018). Also on the Settings.php the DB connection still uses mysql, we are now using mySQLi. We kindly ask for you to upgrade the CMS.
Rudi Hendrix
Let me see if I fully understand
Michael S
Alright.
You may need to contact your developer for that.
Rudi Hendrix
Ok, I am not aware of using anything like magic_quotes_runtime
For example
I don't know what it is or where it is
Michael S
As such, you may need to contact the CMS developer.
Rudi Hendrix
That is Simple Machines Forum. I just installed their software. Or actually, the previous owner of the forum did that
But, what was changed last night?
This has been working just fine until this morning
Title: Re: Database error
Post by: Arantor on July 19, 2020, 02:57:32 PM
Oh dear.

set_magic_quotes_runtime - it's checked if it exists and if not, does nothing (useful for maintaining compatibility across old versions)
Settings.php - just because it says 'mysql' doesn't mean it will be using mysql_query (since SMF 2.0.14 it was replaced with mysqli)

You *are* out of date, 2.0.17 exists, but that's likely not the cause of your issue.

Do you get this error all the time? What page(s) are you on when you do get it?
Title: Re: Database error
Post by: Sir Osis of Liver on July 19, 2020, 04:39:35 PM
Quote
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, 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.

You can ignore that, there's no need to run upgrade.php.  Can you post version info from Admin -> Support and Credits.
Title: Re: Database error
Post by: Plantje on July 21, 2020, 05:58:15 AM
Quote from: Arantor on July 19, 2020, 02:57:32 PM
Oh dear.
You can say that again! By the way: they have fixed it again.... so, without the need for me to "replace my CMS" or "talk to my developers". So, seems strange that it is nothing on their end.
Quote from: Arantor on July 19, 2020, 02:57:32 PM
set_magic_quotes_runtime - it's checked if it exists and if not, does nothing (useful for maintaining compatibility across old versions)
I don't know what it is supposed to do.
Quote from: Arantor on July 19, 2020, 02:57:32 PM
Settings.php - just because it says 'mysql' doesn't mean it will be using mysql_query (since SMF 2.0.14 it was replaced with mysqli)
Ah ok, so they looked at the wrong place. I do understand that they're not an expert in the content of sites they're hosting.
Quote from: Arantor on July 19, 2020, 02:57:32 PM
You *are* out of date, 2.0.17 exists, but that's likely not the cause of your issue.
I want to update as little as possible. The last update I did was just because one.com didn't support the PHP version anymore that I was on. I needed to upgrade PHP and therefore needed to update the SMF version.
Quote from: Arantor on July 19, 2020, 02:57:32 PM
Do you get this error all the time? What page(s) are you on when you do get it?
Yes, I got this error all the time and everywhere... But fortunately not anymore.
Quote from: Sir Osis of Liver on July 19, 2020, 04:39:35 PM
Quote
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, 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.

You can ignore that, there's no need to run upgrade.php.  Can you post version info from Admin -> Support and Credits.

Version Information:
Forum version: SMF 2.0.15
Current SMF version: SMF 2.0.17
(more detailed)
Is this what you meant?
Title: Re: Database error
Post by: Kindred on July 21, 2020, 12:46:38 PM
you really need to stay up-to-date in releases.

1- 2.0.17 supports higher php versions, so you're going to have to do it soon anyway.
2- there are (frequently) security updates in each point release. As a matter of fact, security updates are the primary reason that we make point releases.
Title: Re: Database error
Post by: a10 on July 22, 2020, 05:54:34 PM
2.0.17 + 7.3 + one.com always behaved perfect here. Staying updated is the way to go (as always, backup 1st), only look out for old\outdated mods, eventually uninstall first.