MySQLi and SSL connections |
I'm aware that the client is performing the fallback, but the version numbers referenced in the documentation are the server versions, which don't match up with the PHP client version numbers unless you use a specific distribution of the libmysqlclient.
The client version for the mysqlnd client that shipped with PHP 7 is 5.0.12, so this: PHP Code: version_compare($this->_mysqli->client_info, '5.7.3', '<=') will always return true for mysqlnd. libmysqlclient appears to be up to version 6.1.8, though the MySQL server version is only 5.7.11. The change in behavior noted in the comment appears to have been implemented in libmysqlclient in version 6.1.3: http://dev.mysql.com/doc/relnotes/connec...6-1-3.html Other notes in that same release point to mysql_get_client_info() returning the server version for the MySQL distribution of the libmysqlclient while it returns the library version in Connector/C distributions. This means that the valid values are different based on which distribution was used. Since the Connector/C version number will be higher than the MySQL distribution number, and the change was implemented at the same time as this particular version check, it should be fine, as long as the client still exhibits the same behavior when connecting to older servers. So, the check will succeed if you are using libmysqlclient versions newer than 6.1.3, but the check will fail on mysqlnd regardless of version. The behavior when the check fails is not dangerous in any obvious way, but is causing an unnecessary query. mysqlnd was added in PHP 5.3 and was made the default client for all of PHP's mysql extensions in 5.4, so, over time, it seems likely that mysqlnd will become the more common of the two clients. |
Messages In This Thread |
MySQLi and SSL connections - by mwhitney - 02-15-2016, 02:15 PM
RE: MySQLi and SSL connections - by Narf - 02-15-2016, 03:54 PM
RE: MySQLi and SSL connections - by mwhitney - 02-16-2016, 01:53 PM
RE: MySQLi and SSL connections - by Narf - 02-16-2016, 02:38 PM
RE: MySQLi and SSL connections - by mwhitney - 02-16-2016, 03:20 PM
RE: MySQLi and SSL connections - by mwhitney - 02-26-2016, 10:15 AM
|