Tuesday, 11 November 2008

MySQL and PHP on windows

The last few days I have been setting up a wiki at work using MediaWiki

MediaWiki needs PHP and some sort of database. I chose MySQL.

If I was on a linux server then all would probably have been fairly easy but sadly I am saddled with windows servers here.

If it was a fresh intall then I could probably have used WAMP but apache was already is use for other applications.

So I had to install MySQL & PHP manually. I installed MySQL with no problems, set up the required database and all looked good.

I installed PHP using the provided msi file and selected MySQL from the list of extensions.
When I ran a test php file to see phpinfo() there was no mention of MySQL. This appears to be a very common problem and no mention of the solution was easy at hand.

So the solution.
Copy the file libmySQL.dll from the bin directory of your MySQL install to your WINDOWS/system32 directory

No comments: