Strict_trans_tables sometimes are causes for the problems

Strict_trans_tables sometimes are causes for the problems

Strict_trans_tables sometimes are causes for the problems

Summary 

Two years ago On July 15, 2020, ExpressAfrica Social Media website was not properly browsing showing that image loading error. That night I updated my Ubuntu 20.04 LTS dedicated server that ExpressAfrica was hosted on. It took a long time to find the correct solution for the problem.

Since then, everytime I update my system, I go to phpmyadmin and adjust the settings accordingly. Everything works fine till now.



Timeline

At 02:00 AM I updated the Ubuntu 20.04 LTS system including the LAMP server.

At 02:20 AM I purged the Post mail service and re-installed.

At 02:30 AM u restarted the apache server, sudo service apache2 restart.

At 11:00PM the problem was identified and fixed.

I didn't browse the website and didn't check anything. I go to bed and sleep. In the morning, I wake up and start my journey to field work. I browse the website to post something. Ohhh..there was an error. The website can't load properly.The images were not shown and loaded properly.

Root cause:

I tried to understand the situation and started browsing to know what was the root cause. It was very difficult to exactly find the direct solution but many web administrators faced such problems many times. The root causes were different for different people. Therefore, It takes too long time for me to give a sudden solution to the problem. Nearly 9 hours passed from the time I initially saw the problem. People keep posting on the website but non the image was displayed. After 8 hours of searching for the root cause, I was finally able to fix the problems.

Corrective and Preventive Measures

The problem was, when updating the LAMP server, phpmyadmin automatically updated itself and reset the variable settings. After much struggle,the problem was fixed. I open the phpmyadmin, login to it and browse the variable. Then find the SQL mode and edit. I deleted the : strict_trans_tables" and saved them.  What strict_trans_table does is it abort the statement If a value could not be inserted as given into a transactional table.

Since then, everytime I update my system, I go to phpmyadmin and adjust the settings accordingly. Everything works fine till now.