devryan / GamePanelX-V3

The Original Free and Open Source Game Control Panel
https://www.gamepanelx.com
Other
131 stars 94 forks source link

Expression error #158

Closed ghost closed 6 years ago

ghost commented 7 years ago

Im getting an error when i try to login but after reloading the site im logged in.

Login Failed: Failed to query for plugins: Expression #1 of ORDER BY clause is not in SELECT list, references column 'gpx.plugins.name' which is not in SELECT list; this is incompatible with DISTINCT

Also i cant create templates.

Failed to query for games: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'gpx.d.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

ghost commented 7 years ago

Login fix: Go to includes/classes/plugins.php and change line 128 to this: $result_ac = @mysql_query("SELECT DISTINCT intname FROM plugins WHERE active = '1' ORDER BY intname ASC") or die('Failed to query for plugins: '.mysql_error()); It said that he tried to order by name which is not selected by the query, it should be intname.

Templates fix: Go to admin/games.php and change line 44 to this: d.id t.cfgid is not in the select part of the query, so it should be d.id

wasn325 commented 6 years ago

Can you help me with this problem ?:

Failed to query for games: Expression #8 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'gpx.n.ip' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

It happens, when I try to add a server and choose the network

wasn325 commented 6 years ago

Sorry I mean the server

wasn325 commented 6 years ago

And If I try to ad a template no network is shown up

devryan commented 6 years ago

Which version of MySQL are you running? Any special config options, what type of server is this? Standalone, shared hosting, etc?

On Dec 20, 2017 10:55 AM, "wasn325" notifications@github.com wrote:

And If I try to ad a template no network is shown up

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/devryan/GamePanelX-V3/issues/158#issuecomment-353151108, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVBNuXcqBUQfGYTDPOwdH3QJafY8bV8ks5tCVgWgaJpZM4MC0Bq .

wasn325 commented 6 years ago

Mysql: 5.7.20 standalone

wasn325 commented 6 years ago

screenshot 115 I mean this

wasn325 commented 6 years ago

ok fixed the problem. It was sql_mode=only_full_group_by.

But if I try to make a Template this happenes: Failed: Failed to insert template and I don't know the reason