Trying to look at sent PM messages I get error incompatible with sql_mode=only_f

Started by StallionFire, September 05, 2019, 10:41:28 PM

Previous topic - Next topic

StallionFire

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 hxxp:nfoservers.com [nonactive] 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.


vbgamer45

Yes in \Sources\Subs-Db-mysql.php line 807
Change


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

To



$smcFunc['db_query']('', 'SET sql_mode = \'\',
array(),
false
);

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

StallionFire

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.

vbgamer45

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

StallionFire


vbgamer45

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

StallionFire

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,

vbgamer45

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

StallionFire

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.

Advertisement: