Thursday 8 December 2011

Ultimate Apache/PHP/MySQL config which worked on windows for me!

Hi,
I had the same problem with PHP, MySql and Apache.

I finally solved my problem with the following:

1.Search your server for libmysql.dll. Delete any instance of libmysql.dll that is not in the C:\PHP directory. This limits the possibility of older MySQL client API's being used with PHP.

2.Search your server for php_mysql.dll. Delete any instance of php_mysql.dll that is not in the C:\PHP directory. This limits the possibility of older MySQL client API's being used with PHP.

3.Open your C:\%WIN%\php.ini file in a text editor (Notepad will work).

Search for the line that looks like --> ;extension=php_mysql.dll

Change this line to --> extension=php_mysql.dll

Uncomment: extension_dir="c:\php\ext"

Save the modified php.ini file.

4. Copy php.ini to C:\%WIN%\System32

5. Copy C:\PHP\libmysql.dll and C:\PHP\ext\php_mysql.dll to the C:\%WIN%\system32 folder.

Restart Apache/IIS and test it out.

It worked for me