Connecting Tech Pros Worldwide Forums | Help | Site Map

Using OpenSSL and MySQL

Nik Coughlin
Guest
 
Posts: n/a
#1: May 18 '06
Hi,

I need to get some data from a user via a secure form and then store it in a
secure fashion in a MySQL database, as well as having the site admins able
to retrieve that information securely through a browser.

I have an SSL certificate but I'm not sure how to use it. The OpenSSL
functions section in the PHP documentation isn't helping at all.

Does anyone know where I can find some reasonably straightforward examples
or tutorials that might help me?

For once neither Google nor Google Groups is being particularly useful.

Cheers



Drakazz
Guest
 
Posts: n/a
#2: May 18 '06

re: Using OpenSSL and MySQL


This could help you:
http://mysqld.active-venture.com/Sec...ate_certs.html
I have no guarantees etc, because i never use SSL.

Nik Coughlin
Guest
 
Posts: n/a
#3: May 18 '06

re: Using OpenSSL and MySQL


Drakazz wrote:[color=blue]
> This could help you:
> http://mysqld.active-venture.com/Sec...ate_certs.html
> I have no guarantees etc, because i never use SSL.[/color]

Thanks for that, but it's a guide for using OpenSSL from the command line to
access MySQL, I really need to be able to do it from PHP.


Drakazz
Guest
 
Posts: n/a
#4: May 18 '06

re: Using OpenSSL and MySQL


Very sorry,

use MYSQL_CLIENT_SSL for configuring the connection.

As the php.net/mysql_connect documents:

resource mysql_connect ( [string server [, string username [, string
password [, bool new_link [, int client_flags]]]]] )

So you'd do something like this:
mysql_connect('my.server.com','username','password ',true,
MYSQL_CLIENT_SSL);
Not sure if it'll work as there are no examples, but have a go!
Good Luck!
Regards

Nik Coughlin
Guest
 
Posts: n/a
#5: May 18 '06

re: Using OpenSSL and MySQL


Drakazz wrote:[color=blue]
> Very sorry,
>
> use MYSQL_CLIENT_SSL for configuring the connection.
>
> As the php.net/mysql_connect documents:
>
> resource mysql_connect ( [string server [, string username [, string
> password [, bool new_link [, int client_flags]]]]] )
>
> So you'd do something like this:
> mysql_connect('my.server.com','username','password ',true,
> MYSQL_CLIENT_SSL);
> Not sure if it'll work as there are no examples, but have a go!
> Good Luck!
> Regards[/color]

Thanks, I really appreciate it, there's not much info out there (at least
that I can find!).


Closed Thread