php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: martin dot barker at thisisbeacon dot com
New email:
PHP Version: OS:

 

 [2021-09-01 15:58 UTC] martin dot barker at thisisbeacon dot com
Description:
------------
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 (https://forums.aws.amazon.com/thread.jspa?messageID=850833#850833), as PHP's MySQLi System is supposed to support it this should work.


This may be a regression from https://bugs.php.net/bug.php?id=47017

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

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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-06 08:51 UTC] cmb@php.net
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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 11:01:29 2025 UTC