Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL queries on every page load codeigniter

On all page loads, I have these queries running on my MYSQL server :

      155 Query SET SESSION sql_mode =
                REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
                @@sql_mode,
                "STRICT_ALL_TABLES,", ""),
                ",STRICT_ALL_TABLES", ""),
                "STRICT_ALL_TABLES", ""),
                "STRICT_TRANS_TABLES,", ""),
                ",STRICT_TRANS_TABLES", ""),
                "STRICT_TRANS_TABLES", "")
      155 Query SET NAMES utf8
      155 Quit  

How can I prevent these requests from running? I tried to deactivate "char_set" and "dbcollat" in config/database.php but this has no effect

like image 618
Gemedar Avatar asked Jul 17 '26 14:07

Gemedar


1 Answers

Codeigniter is turning MySQL's strict sql mode off. In the database.php set the strickton parameter to true to enable strict mode.

However, codeigniter wants to make sure that the settings configured for every connection. If you want to take care of these settings in the MySQL config files, then you need to remove (well, comment out) these options from the database.php.

like image 79
Shadow Avatar answered Jul 19 '26 03:07

Shadow