Everytime I install PHP, MySQL in windows boxes I used to get the error message “Cannot load mysql extension. Please check your PHP configuration“. This is because i’d forget to do the necessary steps.

While wandering thru sites most of the people were looking for the same issues.So decided to write a simple post with the necessary steps to solve this while installing PHP, MySQL in a linux box.

PHP.INI settings

1. Modify extension_dir = “./” to extension_dir = “c:/PHP/ext”
2. make sure php_mysql.dll file is inside the folder c:/PHP/ext
3. uncomment the line ;extension=php_msql.dll i.e., remove the comma in the line. so that line will look like

4. Copy the libmysql.dll file to C:\WINDOWS folder
5. restart Apache Service