My ISP has updated the shared server which hosts my application. It involved an update from MySQL 5.6, to MariaDB 10.3. The ISP writes: MariaDB is largely compatible with MySQL and most web applications are written to work just fine with MariaDB. In other words, they don't suffer from the minimal differences.
However, since the update many of my EDIT and INSERT do not work anymore and produce a fatal error. In my search I found:
- the problem is in writing to the database
- seems to occur when not all fields have a value, while empty fields are allowed in my application
On my further investigation I came across: https://forums.cpanel.net/threads/mariadb-10-2-disabling-strict-mode.635157/ According to this thread I understand the solution might be in changing the sql mode in the server settings from:
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
to:
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
I tried to change it through DirectAdmin/PHPAdmin variabes. Since it is a shared server I am not allowed to change the settings so I can not check (SUPER privilege needed).
I now have 3 questions:
- Would this be the solution? In which case I would ask my ISP to change this.
- Is this the best way to fix it?
- Can I solve this in another way?
Suggestions very much appreciated.