Problem loading libmysql.dll inside the Apache Webserver
Facts - Php
Thursday, 24 January 2008 21:56

On my Windows XP laptop I have an apache webserver running, with PHP and a MySQL database server. I use this for developing my websites without internet access. After a reboot of my laptop I got the following message in the Apache webserver error log:

PHP Warning:  PHP Startup: Unable to load dynamic library 'c:\\PHP\\V5_2_5\\ext\\php_mysql.

Moreover I could not see my Joomla websites anymore in my browser. Checking and editing my webserver and php configuration (httpd.conf and php.ini) did not help. After some searching on the internet I found that the library libmysql.dll should be in the path. But that was the case. I found this library in both the PHP installation directory and in the MySQL directory and both libraries were identical.

Finally I executed the following on a cygwin command line:

 
bash-3.2$ which libmysql.dll
/cygdrive/c/CVSNT/libmysql.dll
 

What had happened ? A couple of days after the reboot of my laptop I had installed CVSNT. It turned out that CVSNT also has a libmysql.dll. CVSNT puts its installation directory in front of the windows Path environment variable, which became effective after the reboot. The "which" command showed that the CVSNT directory also contains a copy of libmysql.dll, which was different from the other two. So after removing this library from the CVSNT installation directory my installations of the Apache Webserver, PHP and MySQL worked again together.