Subscribe: RSS
  • I Already posted this on github ....

    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

    This question has been answered by danilocuculic. See the first response.

    • discuss.answer
      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.
      • 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)