I'm working on a setup where Apache and php is installed on one server while mysql is configured on a second server on the same network. I have been able to get mysql setup to use ssl when connecting to the database.
My question is, how would I go about getting wordpress to connect to the database over ssl?
(please note that I am not 100% sure if it a wordpress thing or I need to set it up on the php.ini file) _______________________________________________ wp-hackers mailing list wp-hack...@lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
WordPress itself doesn't support setting the connection to SSL, however, it does offer the ability to use a different Database engine through the usage of the wp-content/db.php dropins.
As a result, It's possible to create a new DB class which does support the MySQL SSL constant.
I've just done so, and I tried testing, but, even with the SSL constant set as the PHP manual says.. it connected to my non-ssl mysql instance without fault.. So i've got no idea if it just falls back to non-ssl, or if there was something wrong with the mysql_connect() command.
It's based on the trunk database file, and altered slightly to account for the missing functions.. as a result, if it fails to connect to the server, you won't get the WordPressy message, you'll just get my lame error message. Feel free to customise as you see fit.
> I'm working on a setup where Apache and php is installed on one server > while mysql is configured on a second server on the same network. I > have been able to get mysql setup to use ssl when connecting to the > database.
> My question is, how would I go about getting wordpress to connect to > the database over ssl?
> (please note that I am not 100% sure if it a wordpress thing or I need > to set it up on the php.ini file) > _______________________________________________ > wp-hackers mailing list > wp-hack...@lists.automattic.com > http://lists.automattic.com/mailman/listinfo/wp-hackers
Thank-you for getting back to me. I'm going to take a look at this and see if I can get it to work. My understanding is that I may need to tell the client app ( in this case, wordpress) to use a certificate like I did when connecting to the mysql server via ssh.
Thank-you Dion :)
On Sun, Feb 26, 2012 at 7:04 PM, Dion Hulse (dd32) <wordpr...@dd32.id.au> wrote:
> WordPress itself doesn't support setting the connection to SSL, > however, it does offer the ability to use a different Database engine > through the usage of the wp-content/db.php dropins.
> As a result, It's possible to create a new DB class which does support > the MySQL SSL constant.
> I've just done so, and I tried testing, but, even with the SSL > constant set as the PHP manual says.. it connected to my non-ssl mysql > instance without fault.. So i've got no idea if it just falls back to > non-ssl, or if there was something wrong with the mysql_connect() > command.
> It's based on the trunk database file, and altered slightly to account > for the missing functions.. as a result, if it fails to connect to the > server, you won't get the WordPressy message, you'll just get my lame > error message. Feel free to customise as you see fit.
> On 26 February 2012 18:24, Daniel Fenn <danielx...@gmail.com> wrote: >> Hello all,
>> I'm working on a setup where Apache and php is installed on one server >> while mysql is configured on a second server on the same network. I >> have been able to get mysql setup to use ssl when connecting to the >> database.
>> My question is, how would I go about getting wordpress to connect to >> the database over ssl?
If you need to tell it to use a Certificate, I think that'll be set within the local MySQL connection settings, but it'll also have to be backed up by PHP(WordPress) asking for the SSL connection in the first place (my code)
If you've got it working for command line MySQL, just give the PHP option a shot, and see if it picks up the system mysql config.. If it doesn't, it might be that you can't use the mysql_* set of functions, and instead need to use mysqli instead, which is a whole different kettle of fish, and i'd suggest questioning if you can't just secure the network between the machines, rather than the connection instead..
On 26 February 2012 19:15, Daniel Fenn <danielx...@gmail.com> wrote:
> Thank-you for getting back to me. I'm going to take a look at this and > see if I can get it to work. My understanding is that I may need to > tell the client app ( in this case, wordpress) to use a certificate > like I did when connecting to the mysql server via ssh.
> Thank-you Dion :)
> On Sun, Feb 26, 2012 at 7:04 PM, Dion Hulse (dd32) <wordpr...@dd32.id.au> wrote: >> WordPress itself doesn't support setting the connection to SSL, >> however, it does offer the ability to use a different Database engine >> through the usage of the wp-content/db.php dropins.
>> As a result, It's possible to create a new DB class which does support >> the MySQL SSL constant.
>> I've just done so, and I tried testing, but, even with the SSL >> constant set as the PHP manual says.. it connected to my non-ssl mysql >> instance without fault.. So i've got no idea if it just falls back to >> non-ssl, or if there was something wrong with the mysql_connect() >> command.
>> It's based on the trunk database file, and altered slightly to account >> for the missing functions.. as a result, if it fails to connect to the >> server, you won't get the WordPressy message, you'll just get my lame >> error message. Feel free to customise as you see fit.
>> On 26 February 2012 18:24, Daniel Fenn <danielx...@gmail.com> wrote: >>> Hello all,
>>> I'm working on a setup where Apache and php is installed on one server >>> while mysql is configured on a second server on the same network. I >>> have been able to get mysql setup to use ssl when connecting to the >>> database.
>>> My question is, how would I go about getting wordpress to connect to >>> the database over ssl?