News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Database Error on 2.0.15, when I click on: "Show new replies to your posts."

Started by rawbert, January 06, 2018, 10:05:49 AM

Previous topic - Next topic

rawbert

Here's the full error message:

Database Error
Expression #1 of ORDER BY clause is not in SELECT list, references column 'smf_kp.t.id_last_msg' which is not in SELECT list; this is incompatible with DISTINCT
File: /var/www/vhosts/localhost.localdomain/kriptopenz.info/forum/Sources/Recent.php
Line: 1103

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.12. The above error might possibly go away if you execute the latest version of upgrade.php.


Forum link:   https://www.kriptopenz.info/forum [nofollow]
Php info link: https://www.kriptopenz.info/phpinfo.php [nofollow]
Mod list: picture attached
SFM version: 2.0.15
PHP version: 7.0.22
MYsql version: 5.7.2
Line 1103 in Recent.php: 'sort' => $_REQUEST['sort'],

Recent changes: Moved forum from Windows Server 2012 to Ubuntu 16.04, both on 1and1 cloud server.

While searching for answers I did come across an older thread with the same issue, but the solution mentioned there is pretty vague and since I'm not an expert I don't really know how to apply it.. "remove the ONLY_FULL_GROUP_BY part from sql_mode"
https://www.simplemachines.org/community/index.php?topic=554500

Thanks in advance for any help.

rawbert

OK, I got it!

So the problem is the newer version of mysql with strict mode on my new server.

Solution:
Open myphpadmin> click on "variables" on top row> scroll down to find "sql mode"> click "edit">delete "ONLY_FULL_GROUP_BY,"> save


Problem solved instantly, no restart needed.

Advertisement: