Advertisement:

Author Topic: Trying to look at sent PM messages I get error incompatible with sql_mode=only_f  (Read 280 times)

Offline StallionFire

  • Newbie
  • *
  • Posts: 7
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.


Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,505
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
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
);
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

Offline StallionFire

  • Newbie
  • *
  • Posts: 7
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.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,505
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Post that file here.. looks like something wasn't changed right.
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

Offline StallionFire

  • Newbie
  • *
  • Posts: 7
I edited my post above and added the file attachment.

Thanks

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,505
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Try this file
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

Offline StallionFire

  • Newbie
  • *
  • Posts: 7
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,

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,505
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Try this forgot one spot.
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

Offline StallionFire

  • Newbie
  • *
  • Posts: 7
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.