Wednesday, December 15, 2004

IIS - PHP - MYSQL ERROR

Encountering the error message "Unable to load dynamic library c:\php\ext\php_mysql.dll" can be a perplexing hurdle in PHP development. This issue typically arises from misconfigurations or missing dependencies. In this troubleshooting guide, we will explore step-by-step solutions to rectify this error, ensuring a smooth integration of the PHP MySQL extension and addressing any underlying issues that may impede the dynamic library's loading process. Let's dive into resolving this common challenge and restoring the seamless functionality of your PHP environment.

Error Message :

"Unable to load dynamic library c:\php\ext\php_mysql.dll"


Please make sure before you follow this instruction, the IIS and PHP are already installed and integrated well, in "php.ini", line "extension=php_mysql.dll" is already Uncomment-ed, and file "php_mysql.dll" is already copied to the right place, just like you have defined at line "extension_dir". Example :
extension_dir = "c:/php/ext/"

Solution :


  1. Copy file libmysql.dll where is located in folder "c:\php\" to folder "c:\WINNT\system32"

  2. Restart IIS, it's also could be done by running this command : "command line/DOS Command", to stop IIS, type "net stop w3svc" or "NET STOP iisadmin" to stop IIS completely, and to restart, type "net start w3svc"

Or :

  1. At the desktop, right click "My Computer" icon >> "Manage", until it show windows "Computer Management"

  2. At the section "Service and Application", right click "Internet Information Services" >> "Restart IIS"




GOOD LUCK!
----------
Please send me information if this solution could not resolve the problem !



No comments: