|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81406 MYSQLI_CLIENT_COMPRESS does not work with aurora MySQL Compatible
Submitted: 2021-09-01 15:58 UTC Modified: 2021-09-06 08:57 UTC
From: martin dot barker at thisisbeacon dot com Assigned:
Status: Open Package: MySQLi related
PHP Version: 8.0.10 OS: Windows 10/11
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
30 - 11 = ?
Subscribe to this entry?

 [2021-09-01 15:58 UTC] martin dot barker at thisisbeacon dot com
When trying to connect to a MySQL Compatible Aurora RDS using MYSQLI_CLIENT_COMPRESS PHP just gets stuck on the first query set to the server, be that a set_charset method or an actual query,

According to AWS Staff Wire Compression used in Aurora MySQL Compatible should work with any MySQL Client supporting it (, as PHP's MySQLi System is supposed to support it this should work.

This may be a regression from

Test script:
$mysqli = new mysqli();
$mysqli->real_connect('hostname', "username", "password", "alexandria", 3306, '', MYSQLI_CLIENT_COMPRESS);
    die("unable to connect to DB");

Expected result:
PHP to use the compressed connection correctly and not just Freeze, 

Actual result:
in the test script, the die code is not executed meaning that PHP thinks it connected correctly, but then the set_charset call will just freeze even past the 30-second default timeout.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-06 08:51 UTC]
The script works for me with PHP-7.4 and PHP-8.0 with local MySQL
5.6 and 8.0.
 [2021-09-06 08:57 UTC] martin dot barker at thisisbeacon dot com
So I was using PHP 8 locally on windows, and connecting to an Aurora RDS via an SSL VPN (Whatgaurd's Mobile VPN with SSL client), and to confirm it was not the SSL VPN i used MySQL Workbench and that worked. I also did not get a failure to connect error from PHP,
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 01 04:05:54 2022 UTC