PHP Mysql and SSL

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

PHP Mysql and SSL

Postby bludragonnerd » 02. December 2010 09:12

Here is my goal: I need to be able to send sensitive data from a web browser on a client computer to a database on my server. I would just hash the variable using sha1 or md5 before submitting the form data but the problem is that I need to have the original data on the server end. I wanted to use SSL to create a secure connection with my Mysql database but there aren't a lot of examples out there of how to do this.

Also, how do I configure SSL with mysql that is bundled with Xampp? I don't believe SSL comes prepackaged with Xampp.
bludragonnerd
 
Posts: 2
Joined: 02. December 2010 09:06

Re: PHP Mysql and SSL

Postby JonB » 02. December 2010 14:02

Ummm -

The distribution for Windows 2000, 2003, XP and Vista. This version contains: Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, Ming, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql.


http://www.apachefriends.org/en/xampp.html

1st - open your browser and type in http://localhost/xampp

Click on the Stats Choice in the left sidebar -

you should see:


Component
Status
Hint
MySQL database ACTIVATED
PHP ACTIVATED
Perl with mod_perl ACTIVATED
Apache::ASP ACTIVATED
HTTPS (SSL) ACTIVATED
Common Gateway Interface (CGI) ACTIVATED
Server Side Includes (SSI) ACTIVATED
IPv4 ACTIVATED
IPv6 DEACTIVATED
SMTP Service DEACTIVATED


OTAY???

XAMPP comes with OpenSSL - although there are many mysteries apparently about getting it to work - I suspect its a function of expertise with certificate chains that keeps that being problematic - its on my 'list to learn' in XAMPP but - I'm tooo busy with regular work to go off on that exploration right now.

Maybe some other good soul will help get you up to speed.

Good Luck
:)

iucrucbafg
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: PHP Mysql and SSL

Postby bludragonnerd » 02. December 2010 20:14

Thanks,

I saw that it has OpenSSL but then under the stats using the shell and typing "mysqladmin.exe" is shows sql disabled by default so then I ran mysqladmin.exe --sql and changed it to enable.

Other than that.... I don't know how to use myql_connect() with the MYSQL_CLIENT_SSL flag. I'm also guessing I have to set the key and certificate in mysqladmin.exe? Anyone know if I am correct?
bludragonnerd
 
Posts: 2
Joined: 02. December 2010 09:06

Re: PHP Mysql and SSL

Postby JonB » 02. December 2010 21:50

you can also use phpMyAdmin to administer MySQL (even if you are using s pre-installed or standalone MySQL server)

just make any needed changes in config.inc.php to connect. You are much more likely to get help on how to do things with the phpMyAdmin tool (or Navicat) that mysqladmin.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 56 guests

cron