Opencart Fatal error: Uncaught Exception: Error: Variable sql_mode cant be set to the value of MYSQL40
In the Opencart installation, the following is the procedure you need to implement if you received an error like this: "Fatal error: Uncaught Exception: Error: Variable 'sql_mode' can't be set to the value of 'MYSQL40"
Solution:
Change the lines of code from the following files:
install/cli_install.php
Search for
$db->query("SET @@session.sql_mode = 'MYSQL40'");
and replace with
$db->query("SET @@session.sql_mode = ''");
install/model/install/install.php
Search for
$db->query("SET @@session.sql_mode = 'MYSQL40'");
and replace with
$db->query("SET @@session.sql_mode = ''");