FrozenNode / Laravel-Administrator

An administrative interface package for Laravel
http://administrator.frozennode.com/
MIT License
1.94k stars 504 forks source link

Laravel 5.3 Mysql Strict Compatibly Issue #1046

Open t202wes opened 7 years ago

t202wes commented 7 years ago

I'm unable to use frozennode on Laravel 5.3 using an AWS RDS Aurora server, MySql 5.6

When trying to open up the admin panel, I get this error:

PDOException·SQLSTATE[42000]: Syntax error or access violation: 1055 'database.users.first_name' isn't in GROUP BY

If I turn change: 'strict' => true, to strict' => false, in /config/database.php mysql settings, it will work.

I think the new mysql strictness of Laravel 5.3 by default, does not work well with Frozennode.

What is weird, is it works on my local machine with mysql 5.7+, but on the production environment with mysql 5.6, it does not work.

t202wes commented 7 years ago

This is really hacky, but for now I did this.

'strict' => ((isset($_SERVER['REQUEST_URI']) and (substr($_SERVER['REQUEST_URI'],0,strlen('/admin')) == '/admin'))) ? false : true,

Turning off strict when using Laravel Administrator.

There was no easy way of making this work. Many of the SQLs for Laravel Administrator are not complaint with Laravel 5.3 database strict rules.

kzvonov commented 7 years ago

Thx. This helps)