We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

ExpressionEngine 2.5.3 now erroring on SQL 5.7

Development and Programming

karlosb's avatar
karlosb
38 posts
6 years ago
karlosb's avatar karlosb

Hi Guys,

I’ve just upgraded a local MAMP installation for developing my EE sites, and it’s now running on MYSQL 5.7.

I have a site running EE 2.5.3 and it’s quite large with lots of add-ons/external PHP scripting etc (hence a nightmare to upgrade!).

The error is:

Error Number: 3065

Expression #1 of ORDER BY clause is not in SELECT list, references column ‘cornucopia_mobile.t.sticky’ which is not in SELECT list; this is incompatible with DISTINCT

SELECT DISTINCT(t.entry_id) FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id !=” AND t.site_id IN (‘1’) AND t.entry_date < 1536310376 AND (t.expiration_date = 0 OR t.expiration_date > 1536310376) AND t.channel_id = ‘2’ AND exp_categories.cat_id = ‘84’ AND t.status = ‘open’ ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc LIMIT 0, 3

Filename: modules/channel/mod.channel.php

Line Number: 2736

I noticed you guys applied a fix/patch for EE 2.10.x onwards a long time ago!

I’m just wondering if there is a quick fix for my 2.5 installation?

Like I say the site is way too complicated to upgrade to the last version of 2.x because of external custom scripting etc.

Any quick fixes to my 2.5.3 installation would be really appreciated if possible?

Kind Regards

Karl

       
Derek Jones's avatar
Derek Jones
7,561 posts
6 years ago
Derek Jones's avatar Derek Jones

Hey Karl! Sorry you’ve hit a bump. The solution thankfully is easy. v2.5.3 is six years old, released September of 2012. MySQL 5.7 wasn’t released until three years later in October of 2015, so v2.5.3 is simply not compatible. You will need to update to at least the latest version of v2 (2.11.9) to be compatible with MySQL 5.7, but you should really target upgrading to the latest, supported version of ExpressionEngine. Six years is a century on the web, in terms of performance, features, and security. Add-ons may need upgrading and refactoring to move to v4, but that’s really what needs to be done. I don’t see how updating to the latest v2 though would be problematic. Cheers!

       
karlosb's avatar
karlosb
38 posts
6 years ago
karlosb's avatar karlosb

Ok no worries Derek and many thanks for the feedback on this.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.