Posts Tagged ‘MySQL’

PHP PDO & Apache mod_rewrite configuration…

Friday, March 13th, 2009

This is just a small post since it only concerns a few stupid thing I did.

For a while I had been trying to get PDO (it is an extension that provides some nice functionalites to connect to databases) to work with mysql. In the php documentation they inform that you need the php_pdo_mysql.dll library to be available and loaded. I went in the library folder and found a php_mysql.dll file… Thinking that maybe since the time the documentation had been written, the file had been renamed and i vainly tried to get PDO working… lost like an hour or so… Well the thing is you really have 2 mysql files, one that is used by PDO and one that is used by the standard mysql commands!

As for the apache story, to enable the pretty prints for the urls on this blog I had to configure mod_rewrite. Not being an expert or anything a while back I had setup some virtual hosts and some directories. So to allow mod_rewrite, i go in my virtual host and modify it accordingly… forgetting that I had a directory section in the file that was superseeding the directives I was giving in the virtual host directory section… So when you try to install mod_rewrite on Apache and you are running virtual hosts, don’t forget to also check your directory directives!

And since I tend to forget this kind of things since I am not an everyday user it is blogged!