PHP mysql_connect ssl

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP mysql_connect ssl

Postby scottbird7 » 09. November 2007 14:10

I've tried to troubleshoot this as much as I can before registering and posting.

I have an application running under xampp 1.6.4 (Windows) written in php which accesses a remote database. The web page is https so I know that ssl is working fine for the apache server. The application works fine when I access the database server using the default mysql_connect form, but fails when I use the MYSQL_CLIENT_SSL flag. I've verified that my.cnf has the client key and certificate along with the ca cert. The mysql command line client can connect to the server using the certificate so it looks like an issue with the php mysql client or I've missed something in the configuration.
Any assistance would be greatly appreciated as I cannot use the unsecured database connection except for testing purposes.
Thanks in advance - and for such a wonderful package as well!
Scott
scottbird7
 
Posts: 3
Joined: 09. November 2007 13:55

Postby Wiedmann » 09. November 2007 14:21

PHP mysql_connect ssl

Use the mysqli extension for SSL (and not the mysql extension).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

mysqli

Postby scottbird7 » 09. November 2007 14:34

Thanks. That may be a problem with one of our servers, but I may be able to get around it using replication until it can be upgraded. We use the os standard distributions from Red Hat which often lag the distribution releases and NEVER seem to move forward ;)
Thanks again,
Scott
scottbird7
 
Posts: 3
Joined: 09. November 2007 13:55

success!

Postby scottbird7 » 09. November 2007 18:14

And there was much rejoicing...
Curious question - why is the ssl option not available in the build of the php mysql extension?
I ask only because, although I was able to rewrite my code to make it work, the red hat distribution worked with the code as it was.
Just curious...
Thanks again!
Scott
scottbird7
 
Posts: 3
Joined: 09. November 2007 13:55


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 69 guests