Edit report at https://bugs.php.net/bug.php?id=55385&edit=1
ID: 55385
User updated by: fuxa_kos at unihost dot cz
Reported by: fuxa_kos at unihost dot cz
Summary: mysqlnd doesn't connect using ssl
-Status: Feedback
+Status: Open
Type: Bug
Package: MySQL related
Operating System: Linux
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2011-08-10 15:21:37] kalle@php.net
And what is the value of $mirm->connect_error and $mirm->connect_errno? The error and errno is
not populated for connection errors, so thats why they are blank
------------------------------------------------------------------------
[2011-08-09 13:22:16] fuxa_kos at unihost dot cz
Description:
------------
mysqlnd doesn't connect using ssl, see Test script
PHP compiled with
'--with-mysql=/usr' \
'--with-mysqli=/usr/bin/mysql_config' \
works fine
but with
'--with-mysql=mysqlnd' \
'--with-mysqli=mysqlnd' \
doesn't work. from phpinfo mysqlnd part:
SSL supported
Connect via mysql client works fine too
mysql --ssl-ca=mysql-cacert.pem --ssl-cert=client-cert.pem --ssl-key=client-key.pem -h
some-mysql-55-server
Local client and libraries are
MySQL-client-community-5.1.58-1.rhel5
MySQL-devel-community-5.1.58-1.rhel5
MySQL-shared-compat-5.5.15-1.rhel5
and same problem with
MySQL-shared-compat-5.1.58-1.rhel5
Target Mysql server (and all libraries and bin's) is 5.5.13.
System: CentOS release 5.6 (Final) in up2date state
Linux camel5 2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Test script:
---------------
var_dump($mirm = mysqli_init());
var_dump($mirm->ssl_set('client-key.pem', 'client-cert.pem',
'mysql-cacert.pem', null, null));
var_dump($mirm->real_connect('some-mysql-55-server', ...));
var_dump($mirm->error);
var_dump($mirm->errno);
Expected result:
----------------
this is working result from mysql legacy driver
object(mysqli)#3 (17) {
["affected_rows"]=>
NULL
["client_info"]=>
string(6) "5.1.58"
["client_version"]=>
int(50158)
["connect_errno"]=>
int(0)
["connect_error"]=>
NULL
["errno"]=>
int(0)
["error"]=>
string(0) ""
["field_count"]=>
NULL
["host_info"]=>
NULL
["info"]=>
NULL
["insert_id"]=>
NULL
["server_info"]=>
NULL
["server_version"]=>
NULL
["sqlstate"]=>
NULL
["protocol_version"]=>
NULL
["thread_id"]=>
NULL
["warning_count"]=>
NULL
}
bool(true)
bool(true)
string(0) ""
int(0)
Actual result:
--------------
this is failed result from mysqlnd driver
object(mysqli)#3 (17) {
["affected_rows"]=>
NULL
["client_info"]=>
string(50) "mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $"
["client_version"]=>
int(50008)
["connect_errno"]=>
int(0)
["connect_error"]=>
NULL
["errno"]=>
int(0)
["error"]=>
string(0) ""
["field_count"]=>
NULL
["host_info"]=>
NULL
["info"]=>
NULL
["insert_id"]=>
NULL
["server_info"]=>
NULL
["server_version"]=>
NULL
["sqlstate"]=>
NULL
["protocol_version"]=>
NULL
["thread_id"]=>
NULL
["warning_count"]=>
NULL
}
bool(true)
bool(false) !!!!!!
string(0) ""
int(0)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55385&edit=1