|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61734 XP mysql_connect() gives Bad handshake error message
Submitted: 2012-04-15 01:25 UTC Modified: 2017-04-19 10:11 UTC
Avg. Score:4.6 ± 0.7
Reproduced:8 of 9 (88.9%)
Same Version:5 (62.5%)
Same OS:2 (25.0%)
From: php at lanar dot com dot au Assigned:
Status: Wont fix Package: MySQL related
PHP Version: 5.4.0 OS: Windows XP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-04-15 01:25 UTC] php at lanar dot com dot au
From manual page:
Host MySQL 5.5.21. Client php 5.4.0

   php -r "mysql_connect( 'host','user','pass', TRUE );"
works but
   php -r "mysql_connect( 'host','user','pass', TRUE, MYSQL_CLIENT_SSL );"
gives error message
   Warning: mysql_connect(): Bad handshake in Command line code on line 1

Test script:
php -r "mysql_connect( $host, $user, $pass, TRUE, MYSQL_CLIENT_SSL );"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-19 10:11 UTC]
-Status: Open +Status: Wont fix
 [2017-04-19 10:11 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

mysql_connect is a deprecated function and was removed in PHP 7.0.0.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 22:01:32 2024 UTC