Edit report at https://bugs.php.net/bug.php?id=55385&edit=1
ID: 55385 Updated by: and...@php.net Reported by: fuxa_kos at unihost dot cz Summary: mysqlnd doesn't connect using ssl -Status: Open +Status: Feedback Type: Bug Package: MySQL related Operating System: Linux PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Hi, can you provide a packet dump from the wire. mysqlnd + ssl doesn't work for localhost (unix socket) because of the limitations the PHP Streams impose on mysqlnd, but here the case seems to be different? Previous Comments: ------------------------------------------------------------------------ [2011-10-03 20:43:52] dnsdns at gmail dot com I forgot to mention that PHP was compiled with openssl support so mysqlnd could have used it to connect. There was no error about the connection, just the access denied coming from mysql 5.1. ------------------------------------------------------------------------ [2011-10-03 20:34:26] dnsdns at gmail dot com Using PDO Mysql compiled with mysqlnd it doesnt work, if I recompile it with libmysql the same code works. It seems mysqlnd doesnt use the supplied keys and doesnt initiate ssl. I am using PHP 5.3.8 $DB = new PDO("mysql:host=hostname;dbname=ssltest", 'test','mypass', array( PDO::MYSQL_ATTR_SSL_KEY => '/path/client-key.pem', PDO::MYSQL_ATTR_SSL_CERT => '/path/client-cert.pem', PDO::MYSQL_ATTR_SSL_CA => '/path/cacert.pem' )); ------------------------------------------------------------------------ [2011-08-11 13:27:41] fuxa_kos at unihost dot cz PHP compiled by same way (and same OS and Mysql RPM's) with mysqlnd __can__ connect from Mysql 5.5 box to 5.1. But from 5.1 to 5.5 with mysqlnd __can not__ (but with libmysql works fine) - as I reported. ------------------------------------------------------------------------ [2011-08-11 13:20:12] fuxa_kos at unihost dot cz sry, box where I wrote that works fine haven't mysqlnd. When PHP is compiled with mysqlnd (at this same box) doesn't work too. I confirm for mysqlnd return real_connect: false var_dump($mirm->connect_error); var_dump($mirm->connect_errno); NULL int(0) ------------------------------------------------------------------------ [2011-08-11 13:12:26] fuxa_kos at unihost dot cz returns connect_error: NULL connect_errno: int(0) I test it from other box with same OS and Mysql 5.1, works fine! But difference this box have Mysql-server with have_openssl = YES. First case haven't Mysql server. I can test it from another box, with PHP from Zend Server CE, then give additional fdb. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=55385 -- Edit this bug report at https://bugs.php.net/bug.php?id=55385&edit=1