Edit report at http://bugs.php.net/bug.php?id=53795&edit=1
ID: 53795 Comment by: carsten_sttgt at gmx dot de Reported by: dave dot kelly at dawkco dot com Summary: Connect Error from MySqli (mysqlnd) when using SSL Status: Closed Type: Bug Package: MySQLi related Operating System: Windows PHP Version: 5.3.5 Assigned To: kalle Block user comment: N Private report: N New Comment: @ kalle > as MYSQLND_SSL_SUPPORTED is not defined on Windows, > its a simple one line fix that I will commit shortly How is MySQLnd SSL support related to ZLIB? I think you should move the AC_DEFINE below the "if PHP_ZLIB" block, like this is done in the *nix configure (means always enabled). Of course, in my opinion both (windows/*nix) is wrong. At the moment phpinfo is always showing you "SSL => supported", even PHP is build without OpenSSL and SSL connection (through the streams) can't work. So, what is "SSL => supported" telling me? a) mysqlnd is build with SSL support. --> In this case there should be a configure switch like "--enable-mysqlnd-ssl" (or only define this, if PHP is also build with OpenSSL) b) MySQLnd SSL connections are currently working in this installation. --> in this case this should be a runtime setting and not a compiler define. (because a shared OpenSSL extension maybe loaded or not) Previous Comments: ------------------------------------------------------------------------ [2011-02-05 10:54:52] dave dot kelly at dawkco dot com OK, the patch works. Mysqli (mysqlnd build) on Windows can now use SSL/TLS connections. Thank you! ------------------------------------------------------------------------ [2011-01-31 13:51:40] [email protected] This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2011-01-31 13:47:31] [email protected] Automatic comment from SVN on behalf of kalle Revision: http://svn.php.net/viewvc/?view=revision&revision=307880 Log: Fixed bug #53795 (Connect Error from MySqli (mysqlnd) when using SSL) ------------------------------------------------------------------------ [2011-01-30 11:35:52] [email protected] I got an idea why this fails, as MYSQLND_SSL_SUPPORTED is not defined on Windows, its a simple one line fix that I will commit shortly ------------------------------------------------------------------------ [2011-01-29 09:36:07] dave dot kelly at dawkco dot com FYI (you probably already know): there are currently no SSL/TLS options available to be set with the mysqli::options method. I tried using the mysqli::ssl_set method as follows, but it didn't work either (same connect error): $mysqli->ssl_set(NULL, // key file path or NULL NULL, // cert file path or NULL 'C:/ssl/ca-cert.pem', // ca cert file path or NULL NULL, // capath directory or NULL 'DHE-RSA-AES256-SHA'); // cipher or NULL Also, tried the following (no luck): $mysqli->ssl_set('C:/ssl/key.pem', // key file path or NULL 'C:/ssl/cert.pem', // cert file path or NULL 'C:/ssl/ca-cert.pem', // ca cert file path or NULL NULL, // capath directory or NULL NULL); // cipher or NULL As noted before, these all work with PHP 5.2.17, but not with PHP 5.3.5. A fix for mysqlnd would be great because trying to do a custom build on Windows with mysqlnd disabled has become a real ordeal. ------------------------------------------------------------------------ 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 http://bugs.php.net/bug.php?id=53795 -- Edit this bug report at http://bugs.php.net/bug.php?id=53795&edit=1
