ID:               45273
 User updated by:  luciandipeso at yahoo dot com
 Reported By:      luciandipeso at yahoo dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         MySQLi related
 Operating System: OS X, FreeBSD
 PHP Version:      5.2.6
 Assigned To:      uw
 New Comment:

I'm not sure what you mean by "kick out the web server and try a
command 
line script."

I am able to connect to MySQL using SSL from the command line, but I 
haven't tried PHP CLI if that's what you mean.

I'm not sure if this is a duplicate bug -- in #41778, the person 
actually gets an error returned. For me, the script just hangs until it

times out and I get a 500 status code.

I've also tried specifying the SSL certs in a my.cnf file, and skipping

the $db->ssl_set call, but that doesn't work either.


Previous Comments:
------------------------------------------------------------------------

[2008-07-14 19:39:53] [EMAIL PROTECTED]

Please check if your report is a duplicate of
http://bugs.php.net/bug.php?id=41778 . Kick out the web server and try a
command line script. If its a duplicate, which I guess, we can close
this one.

------------------------------------------------------------------------

[2008-06-19 18:51:47] luciandipeso at yahoo dot com

I'm starting to think that the problem is that mysqli_ssl_set() is not

working -- no certs are being specified, and so when PHP tries to 
connect over SSL to MySQL, it just hangs.

------------------------------------------------------------------------

[2008-06-14 23:22:39] luciandipeso at yahoo dot com

-- Should say "When I supply the MYSQLI_CLIENT_SSL flag to 
mysqli::real_connect, the 
script hangs until it either" not "I either" :)

------------------------------------------------------------------------

[2008-06-14 23:21:58] luciandipeso at yahoo dot com

Description:
------------
When I supply the MYSQLI_CLIENT_SSL flag to mysqli::real_connect, the 
script hangs until I either:
get a 500 response from the web server (tested on a shared host running

FreeBSD)
or simply get a "Server unexpectedly dropped the connection" response 
(tested on my MacBook Pro running OS X 10.4.11).
 
I am able to connect fine via command line.

I looked in my Apache logs, and found no entries.

Reproduce code:
---------------
$db = new mysqli();
$db->init();
                
$db->ssl_set('/path/to/key.pem', '/path/to/cert.pem',
'/path/to/ca.pem', NULL, NULL);

$db->real_connect('1.2.3.4', 'login', 'pass', 'database', 3167, '',
MYSQLI_CLIENT_SSL);

$query = $db->query("SHOW STATUS");
while($row = $query->fetch_assoc()) {
        print_r($row);
        echo('<br /><br />');
}


Expected result:
----------------
An SSL enabled connection to a remote MySQL database.

Actual result:
--------------
Either a 500 response or a "Server unexpectedly dropped the connection"

response.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45273&edit=1

Reply via email to