Restarting IIS: Unable to load dynamic library 'C:\PHP\ext\php_mysql.dll'

Get the following message when restarting IIS:
PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_mysql.dll' - The specified procedure could not be found.

Am using MySQL Server 4.1 and PHP 5.0.4

How do I fix this problem?

Who is Participating?
Make sure you've restarted IIS after editing php.ini.

If that doesn't works for you, copy the libmySQL.dll file from mysql\bin directory into windows\system and windows\system32 directories.
PHP5 (unlike PHP4) does not have MySql extension enabled by default in windows. Edit php.ini file and uncomment the "extension" line by removing the semi-colon. So it should look like:

extension = php_mysql.dll

Make sure the .dll file exists in the defined "extension_dir" line of your php.ini. If you dont find the file, get it from the zipped version of PHP5 (I think the file is not available in the installer version).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.