[php-maint] Bug#572122: Starting from php5-mysql-5.3 mysql connection over SSL stops working
Laurento Frittella
laurento.frittella at gmail.com
Mon Mar 1 17:59:30 UTC 2010
Package: php5-mysql
Version: 5.3.1-5
Severity: normal
Using php5.3 I can't connect to mysql using SSL
The following code snippet works under php5.2 at lenny but it fails at ssl_set() using php5.3 at squeeze (php5.2 at squeeze before upgrade worked too).
<?
$mysqli = mysqli_init();
if (!$mysqli) {
die('mysqli_init failed');
}
if (!$mysqli->ssl_set(null, null, "cacert.pem", null, null)) {
die('Setting SSL_SET failed');
}
if (!$mysqli->real_connect('mysql.domain.loc', 'user', 'pwd', 'db_name')) {
die('Connect Error (' . mysqli_connect_errno() . ') '
. mysqli_connect_error());
}
echo 'Success... ' . $mysqli->host_info . "\n";
$mysqli->close();
?>
As reported by php official documentation at http://www.php.net/manual/en/mysqli.ssl-set.php
"Note that MySQL Native Driver does not support SSL, so calling this function when using MySQL Native Driver will result in an error"
Otherwise "This function always returns TRUE value"
I'm not sure if the latest 5.3 debian package enables mysqlnd support (it doesn't support compression and SSL officially at the moment, http://dev.mysql.com/downloads/connector/php-mysqlnd/ ) causing this problem, but in this case please consider to release another package (php5-mysql-legacy?) build without mysqlnd (MySQL Native Driver) support.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.27-openvz-briullov.1-r4 (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages php5-mysql depends on:
ii libapache2-mod-php5 [phpapi-2 5.3.1-5 server-side, HTML-embedded scripti
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
ii libmysqlclient16 5.1.41-3 MySQL database client library
ii php5-cli [phpapi-20090626+lfs 5.3.1-5 command-line interpreter for the p
ii php5-common 5.3.1-5 Common files for packages built fr
php5-mysql recommends no packages.
php5-mysql suggests no packages.
-- no debconf information
More information about the pkg-php-maint
mailing list