Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: StallionFire on September 05, 2019, 10:41:28 PM

Title: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: StallionFire on September 05, 2019, 10:41:28 PM
I tried some tips to remove the "only_full_group_by" from the sql modes and I get another error saying I need super user.

I use NFOservers.com as my web host.  They told me I can't remove it because they don't give out super user.

They gave me this suggestion: 

1. Add a SQL command before the query that overrides the session variables and removes ONLY_FULL_GROUP_BY, such as this one:

SET SESSION sql_mode = '';

My problem is that I don't know what file to edit or make to do this.

I am running Simple Machines 2.0.15 with simple portal 2.3.7


Also this is my exact error when I click on sent items:   

Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'webrat_smfdmgamers.pm.id_pm' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /usr/www/webrat/public/dmforum/Sources/PersonalMessage.php
Line: 700



Can anyone help?

Thank You.

Title: Re: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: vbgamer45 on September 05, 2019, 11:30:29 PM
Yes in \Sources\Subs-Db-mysql.php line 807
Change

Code: [Select]
if (isset($mysql_set_mode) && $mysql_set_mode === true)
$smcFunc['db_query']('', 'SET sql_mode = \'\', AUTOCOMMIT = 1',
array(),
false
);
To

Code: [Select]

$smcFunc['db_query']('', 'SET sql_mode = \'\',
array(),
false
);
Title: Re: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: StallionFire on September 10, 2019, 04:50:12 PM
I replaced the code to what you have in your last post.  I now get a new error when even trying to get to the site url.

ERROR:       

Parse error: syntax error, unexpected 'query_see_board' (T_STRING), expecting ',' or ')' in /usr/www/webrat/public/dmforum/Sources/Subs-Db-mysql.php on line 842

Any Ideas ?

See file attached.


Thanks again.
Title: Re: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: vbgamer45 on September 10, 2019, 04:52:28 PM
Post that file here.. looks like something wasn't changed right.
Title: Re: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: StallionFire on September 10, 2019, 05:01:48 PM
I edited my post above and added the file attachment.

Thanks
Title: Re: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: vbgamer45 on September 10, 2019, 05:04:53 PM
Try this file
Title: Re: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: StallionFire on September 10, 2019, 05:14:33 PM
I can log in now and check my mail. but when I try to see sent messages it gives me this error.

Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'webrat_smfdmgamers.pm.id_pm' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /usr/www/webrat/public/dmforum/Sources/PersonalMessage.php
Line: 700

See attached PersonalMessage.php if you need it.

Thanks,
Title: Re: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: vbgamer45 on September 10, 2019, 05:37:20 PM
Try this forgot one spot.
Title: Re: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f
Post by: StallionFire on September 10, 2019, 06:00:41 PM
Still getting the same error message.

Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'webrat_smfdmgamers.pm.id_pm' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /usr/www/webrat/public/dmforum/Sources/PersonalMessage.php
Line: 700

Everything else on the site works.  It only happens on sent messages when you try to view them.  All messages get delivered when sent.