Welcome to Logaholic Q&A, where you can ask questions and receive answers from other members of the community.

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

More Support Resources
0 votes
asked 7 months ago by anonymous

1 Answer

0 votes
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
answered 7 months ago by Mark

Related questions

0 votes
1 answer
asked 7 months ago by anonymous
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer