Guides & TutorialsTroubleshooting Common ErrorsTroubleshooting a Critical Error - Could not connect to the database Error

Troubleshooting a Critical Error - Could not connect to the database Error

Symptom

After applying the 3rd November 2020 MariaDB updates  we have received reports of environments running certain PHP versions experiencing the following errors when accessing a WHMCS page:

PHP 5.6

SQLSTATE[HY000]: General error: 1835 Malformed communication packet

 

PHP 7.0, 7.1, 7.2

Critical Error Could not connect to the database.

Cause

The 3rd November 2020 MariaDB updates MariaDB update appears to have introduced a DB connection issue for PHP =< 7.2

Resolution

1. Recommended - An update has been released by MariaDB which resolves the problem. Please apply the relevant update to your system:


  • 10.2.36
  • 10.3.27
  • 10.4.17
  • 10.5.8


2. Users running WHMCS v7.6 and above can switch their environment to PHP 7.3 

The issue has been reported upstream to MariaDB.

This article will be updated with more information as the details crystallize.