How do I get PHP to work with MySQL on Windows?

2011-10-04 11:29:12Tags: php,mysql,windows

Answer:

Unfortunately PHP5 removed built-in support for MySQL. To get it to work, the easiest way is to copy the mysql library file by hand. Open the folder you unzipped your PHP to. Copy the libmysql.dll file (should be located like E:\php\libmysql.dll ) into your Window's System folder (usually C:\Windows\System32\ although might be C:\WinNT\System\ or something). Then open up your php.ini in a text editor and search for ;extension=php_mysql.dll and remove the ; infont of that line. Restart Apache/IIS and see if you get any errors. If it complains about "php_mysql.dll" either your extension directory isn't correct or windows can't find libmysql.dll
The information on this page relates to older Logaholic versions (prior to Logaholic 6) and may be outdated.