I installed into a new machine ubuntu server 16.04, with PHP 7.0 and Mysql 5.7.12.
Installation finished but have a Fatal Error into admin Page and blog pages.
This is a piece of this error:
An exception occurred while executing 'SELECT DISTINCT e.* FROM elg_entities e join elg_users_entity u on e.guid = u.guid WHERE u.last_action >= 1464095396 AND ((e.type = 'user')) AND (e.site_guid IN (1)) AND ((1 = 1) AND (e.enabled = 'yes')) ORDER BY u.last_action desc LIMIT 0, 8':
SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'elgg.u.last_action' which is not in SELECT list; this is incompatible with DISTINCT
QUERY: SELECT DISTINCT e.* FROM elg_entities e join elg_users_entity u on e.guid = u.guid WHERE u.last_action >= 1464095396 AND ((e.type = 'user')) AND (e.site_guid IN (1)) AND ((1 = 1) AND (e.enabled = 'yes')) ORDER BY u.last_action desc LIMIT 0, 8
DatabaseException Object
(
[message:protected] => An exception occurred while executing 'SELECT DISTINCT e.* FROM elg_entities e join elg_users_entity u on e.guid = u.guid WHERE u.last_action >= 1464095396 AND ((e.type = 'user')) AND (e.site_guid IN (1)) AND ((1 = 1) AND (e.enabled = 'yes')) ORDER BY u.last_action desc LIMIT 0, 8':
SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'elgg.u.last_action' which is not in SELECT list; this is incompatible with DISTINCT
QUERY: SELECT DISTINCT e.* FROM elg_entities e join elg_users_entity u on e.guid = u.guid WHERE u.last_action >= 1464095396 AND ((e.type = 'user')) AND (e.site_guid IN (1)) AND ((1 = 1) AND (e.enabled = 'yes')) ORDER BY u.last_action desc LIMIT 0, 8
[string:Exception:private] => DatabaseException: An exception occurred while executing 'SELECT DISTINCT e.* FROM elg_entities e join elg_users_entity u on e.guid = u.guid WHERE u.last_action >= 1464095396 AND ((e.type = 'user')) AND (e.site_guid IN (1)) AND ((1 = 1) AND (e.enabled = 'yes')) ORDER BY u.last_action desc LIMIT 0, 8':
SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'elgg.u.last_action' which is not in SELECT list; this is incompatible with DISTINCT
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- iionly@iionly

iionly - 0 likes
- Juho Jaakkola@juho.jaakkola

Juho Jaakkola - 1 like
- nikos@nlyberakis

nikos - 0 likes
- Daniele Frulla@danielsan22

Daniele Frulla - 0 likes
- leonardo2000@leonardo2000

leonardo2000 - 0 likes
- Mick@mikamatto

Mick - 0 likes
- Mick@mikamatto

Mick - 0 likes
You must log in to post replies.I think Elgg isn't fully ready yet for mysql 5.7 (next release might fix some issues but even then it might not work without issues yet). Also, using Elgg on php 7 might result in some issues still (maybe not necessarily when only using Elgg core but rather when additionally using 3rd party plugins as I don't think there has been done much testing with php 7 yet).
As a workaround for the MySQL incompatibility, you can simply revert the ONLY_FULL_GROUP_BY settings back to the behavior it had in previous versions on MySQL:
@Juho Jaakkola: thanks, it worked
Thanks, work
I had the same problem with mysql 5.7 with elgg 2.2.0.
I solved with workaround by Juho, thanks a lot
Thanks for this workaround; how can I apply this? Is it a MySql command or a setting I should change somewhere? Sorry for the dumb question but I'm feeling lost
Just realised it is a SQL instruction. Cut and paste didn't work initially because of an extra character being copied, but now it went through and all is solved. Thank you!