<![CDATA[ Evo 1.4.5 -> MySQL server strict sql_mode trouble - My Forums]]> https://forums.modx.com/thread/?thread=104564 <![CDATA[Evo 1.4.5 -> MySQL server strict sql_mode trouble]]> https://forums.modx.com/thread/104564/evo-1-4-5---mysql-server-strict-sql-mode-trouble#dis-post-562386
Our shared server was updated to MariaDB version 10.2 with "strict mode" enabled by default.
Trying to log into the manager I get the error:

> « Evo Parse Error »
> Execution of a query to the database failed - Data too long for column 'ip' at row 1

> SQL > INSERT INTO `sycust_db01`.`modx_manager_log` (`timestamp`, `internalKey`, `username`, `action`, `itemid`, `itemname`, `message`, `ip`, `useragent`) VALUES('1540846718', '1', 'cubus', '58', '-', 'MODX', 'Logged in', '2a02:8109:9a80:7334:4b6:7a9d:6bab:b107', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/601.7.8')

So I tried a new install, which also throws a Warning and does not resolve the error:

> Checking MySQL for strict sql_mode: WARNING! MySQL server strict sql_mode is enabled!
>
> Certain features of EVO may not work properly unless the STRICT_TRANS_TABLES sql_mode is disabled. You can set the MySQL mode by editing the my.cnf file or contact your server administrator.

Because of security reasons the server admin does not want to change his MySQL, so I need a work around for this issue. Any idea?

thanks
]]>
cu.bus Oct 29, 2018, 09:17 PM https://forums.modx.com/thread/104564/evo-1-4-5---mysql-server-strict-sql-mode-trouble#dis-post-562386
<![CDATA[Re: Evo 1.4.5 -> MySQL server strict sql_mode trouble]]> https://forums.modx.com/thread/104564/evo-1-4-5---mysql-server-strict-sql-mode-trouble#dis-post-562409 Quote from: danilocuculic at Oct 30, 2018, 08:08 AM
Quote from: cu.bus at Oct 29, 2018, 09:17 PM
Data too long for column 'ip' at row 1
(...)
Because of security reasons the server admin does not want to change his MySQL, so I need a work around for this issue. Any idea?

I don't have 1.4.x installed anywhere, but solution to this particular problem is increasing ip column length in table modx_manager_log.

Correct, thanks!
It happens because IPv6 has more chars than IPv4 which the column length was set for originaly.
Quick fIx: ALTER TABLE your_db_name.modx_manager_log CHANGE COLUMN ip ip varchar(50)
]]>
cu.bus Oct 30, 2018, 09:43 AM https://forums.modx.com/thread/104564/evo-1-4-5---mysql-server-strict-sql-mode-trouble#dis-post-562409
<![CDATA[Re: Evo 1.4.5 -> MySQL server strict sql_mode trouble (Best Answer)]]> https://forums.modx.com/thread/104564/evo-1-4-5---mysql-server-strict-sql-mode-trouble#dis-post-562406 Quote from: cu.bus at Oct 29, 2018, 09:17 PM
Data too long for column 'ip' at row 1
(...)
Because of security reasons the server admin does not want to change his MySQL, so I need a work around for this issue. Any idea?

I don't have 1.4.x installed anywhere, but solution to this particular problem is increasing ip column length in table modx_manager_log.]]>
danilocuculic Oct 30, 2018, 08:08 AM https://forums.modx.com/thread/104564/evo-1-4-5---mysql-server-strict-sql-mode-trouble#dis-post-562406