Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
1.4.1
-
docker centos 7, containers: maxscale, 1 master, 2 slaves, nginx-php as web, some more for load balancing web
-
2016-11
Description
enter web container, create test file, switch $client_flags
<?php
|
|
$client_flags = 0; |
// works fine
|
|
// $client_flags = MYSQLI_CLIENT_COMPRESS;
|
// hangs
|
|
$mysqli = mysqli_init(); |
|
$mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT, 10); |
|
$hostname = 'db'; |
$username = '***'; |
$password = '***'; |
$port = 3306; |
$database = '***'; |
$socket = ''; |
|
$mysqli->real_connect($hostname, $username, $password, $database, $port, $socket, $client_flags); |
|
if ($mysqli->connect_errno) { |
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error; |
}
|
|
echo $mysqli->host_info . "\n"; |
|
$res = $mysqli->query("SELECT @@server_id id, @@hostname host"); |
|
|
while ($row = $res->fetch_assoc()) { |
echo " res = " . $row['id'] . ' : ' . $row['host'] . "\n"; |
}
|
|
?>
|