Learn about Centmin Mod LEMP Stack today
Become a Member

Backported PHP 7.3 mysqlnd Fixes For PHP <= 7.2 "Malformed communication packet" Errors

Discussion in 'Centmin Mod News' started by eva2000, Nov 6, 2020.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    45,662
    10,360
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,079
    Local Time:
    4:08 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Updated Centmin Mod 123.09beta01 with the new backported patches for mysqlnd fix in PHP <= 7.2 related to MariaDB's 10.5.7, 10.4.16, 10.3.26, 10.2.35 and 10.1.48 release issue as these versions have stricter packet validation as a security measure which cause malformed communication packet errors.

    The Centmin Mod update added a variable PHP_MYSQLND_PATCH_FIX='y' to control whether the backported patches are applied or not. Details outlined at Beta Branch - add PHP 7.0.33, 7.1.33 & 7.2 mysqlnd fix patch for MariaDB in 123.09beta01. You can also use that linked thread for discussions for this patch update.

    patched PHP 7.2.34 seems to be working on Xenforo 2.1 test forums

    xf21-php7234-mariadb-10.3.26-01.png

    without the backported mysqlnd PHP 7.3 patch to PHP 7.2.x, you will get the errors for "Exception: MySQL query error [1835]: Malformed communication packet" like in Centmin Mod PHP-FPM error log and on frontend will get Internal 500 errors

    Code (Text):
    [05-Nov-2020 17:32:58 UTC] PHP Fatal error:  Uncaught XF\Db\Exception: MySQL query error [1835]: Malformed communication packet in /home/nginx/domains/domain.com/public/src/XF/Db/AbstractStatement.php:228
    Stack trace:
    #0 /home/nginx/domains/domain.com/public/src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1835, 'HY000')
    #1 /home/nginx/domains/domain.com/public/src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1835, 'HY000')
    #2 /home/nginx/domains/domain.com/public/src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
    #3 /home/nginx/domains/domain.com/public/src/XF/Db/AbstractAdapter.php(175): XF\Db\AbstractAdapter->query('\n\t\t\tSELECT data...', Array)
    #4 /home/nginx/domains/domain.com/public/src/XF/DataRegistry.php(138): XF\Db\AbstractAdapter->fetchPairs('\n\t\t\tSELECT data...')
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,662
    10,360
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,079
    Local Time:
    4:08 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Note PHP 7.2 Security updates end on November 30, 2020 PHP: Supported Versions. So only 24 days to go. So ideally, you'd update to PHP 7.3 or 7.4 if possible. But if you can't then above backported fixes allow you to use PHP <=7.2.
     
Thread Status:
Not open for further replies.