From:             mattficken
Operating system: Windows
PHP version:      5.4.0beta1
Package:          MySQLi related
Bug Type:         Bug
Bug description:mysqlnd + ssl failure

Description:
------------
I have setup an mysql 5.5 server with SSL support. I can access it over SSL
using the Mysql CLI client. During my testing, I didn’t change the server
configuration or restart the server.

I am testing mysqlnd and php5.4.0b1 on both Windows and Linux (x64) through
mysqli and PDO-mysql.

Mysqlnd over SSL fails  with php 5.4.0b1 on both Windows and Linux, though
it fails differently (possibly two different problems). Mysqlnd works fine
over TCP with 5.4.0b1 on both Windows and Linux. 

It works on php 5.3.8 on both Windows and Linux over both TCP and SSL.

I have attached packet captures, error messages and my test script.  I
haven’t run any PHPT mysql tests over SSL as my test script (which just
tries to connect and run a simple query) always fails.

On PHP 5.4.0b1, Windows displays error messages. Warning messages about
stream not supporting SSL/Crypto are wrong (socket does support SSL crypto,
mysqlnd messes up handshake).

On PHP 5.4.0b1, Linux hangs on mysqli_real_connect. From plaintext part of
packet capture, it looks proper.



Test script:
---------------
<?php

$pdo = new PDO(
    'mysql:host=10.200.51.57;dbname=mysql',
    'root',
    'password01!',
    array(
        PDO::MYSQL_ATTR_SSL_KEY   =>'client-key.pem',
        PDO::MYSQL_ATTR_SSL_CERT  =>'client-cert.pem',
        PDO::MYSQL_ATTR_SSL_CA    =>'ca-cert.pem'
    )
);
var_dump($pdo);

$pdo->query("SHOW TABLES");

?>

Actual result:
--------------
PHP Warning:  PDO::__construct(): this stream does not support SSL/crypto
in C:\
Users\Administrator\Desktop\mysql_ssl_test.php on line 31

Warning: PDO::__construct(): this stream does not support SSL/crypto in
C:\Users
\Administrator\Desktop\mysql_ssl_test.php on line 31
PHP Warning:  PDO::__construct(): Cannot connect to MySQL by using SSL in
C:\Use
rs\Administrator\Desktop\mysql_ssl_test.php on line 31

Warning: PDO::__construct(): Cannot connect to MySQL by using SSL in
C:\Users\Ad
ministrator\Desktop\mysql_ssl_test.php on line 31
NULL
PHP Fatal error:  Call to a member function query() on a non-object in
C:\Users\
Administrator\Desktop\mysql_ssl_test.php on line 34

Fatal error: Call to a member function query() on a non-object in
C:\Users\Admin
istrator\Desktop\mysql_ssl_test.php on line 34


-- 
Edit bug report at https://bugs.php.net/bug.php?id=55848&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55848&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55848&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55848&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55848&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55848&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55848&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55848&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55848&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55848&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55848&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55848&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55848&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55848&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55848&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55848&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55848&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55848&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55848&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55848&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55848&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55848&r=mysqlcfg

Reply via email to