Problems upgrading MySql 5.7 - MariaDB 10.3

Operating System & Version
Centos 7
cPanel & WHM Version
cPanel 90.0.17

e-richard

Registered
Dec 1, 2020
3
0
1
Surrey
cPanel Access Level
Website Owner
In order to update cPanel, my webhost has moved us from CENTOS 6 to CENTOS 7 - on a new test server.
They also upgraded us from mySql 5.7.32 to MariaDB 10.3.27
And cPanel 86.0.32 to 90.0.17
I have a VPS contract and am currently paying for TWO serves while we test the new one.

They (webhosts) did a full cPanel copy of my old environment to the new including many databases and a large PHP application.

We're now getting hundreds of errors from the PHP application, but having examined closely they are all of the same type/genre (?)
e.g.
Error filling table mytest1 Incorrect integer value: '' for column `holidayg_PIMS0001`.`mytest1`.`myage` at row 1

From further testing, I have established that regardless of the default set in the database creation, any field in any form that is not filled in (i.e. blank) will fail with an error like the above on all database updates or inserts.
If, we explicitly put a NULL or any other default value into the field in the code just prior to insert or update, then all is OK. But surely that should be unnecessary.

Given that my application has been developed over the past 10 years, some hundreds of thousands of lines of code and hundreds of forms and fields, fixing this as described above is exceedingly onerous. Surely there is a better solution or surely something else is wrong ?

I have also tested this (using the exact same script) on yet another server with MariaDB 10.0.38 where it does not generate these errors.

My question here is where or what do we look for?

(I am inclined to think something went wrong when the server was "copied", but thats a purely intuitive diagnosis - I have no evidence)
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,001
922
313
cPanel Access Level
Root Administrator
Hey there! I agree it would be good to know more about how they copied the data over. When moving MySQL files, you can't just perform a straight copy or rsync, as it is best to do that work with a MySQL dump file.

The best way to test this would be to perform a MySQL dump on the Source machine and import it into a server running MariaDB 10.3. That way you would know for sure if the issue was with the MySQL version or with the way the data was copied.
 

thewebexpert

Member
May 6, 2013
9
1
53
cPanel Access Level
Root Administrator
This is an old thread, but I wanted to let you know what the problem is, because I have had a client go through this same thing... It is Strict Mode that is on default. google how to turn it off, and the sites will work normally. Ideally you want the code changes, these calls are slower .. but hey, in the end you need a working site for clients. It is also very uncool for an ISP/VPS provider to charge for a temp server ... I had to upgrade to CentOS 7 and they gave me two weeks to doublecheck all of the settings....