PHP5, MySQL, IIS and WINDOWS 2003 Server

Posted by Paul Farrow - Under: Software

Had some bother with the extensions of php5, php_mysql.dll and libmysql.dll under my latest installation on windows 2003 server.  When using the mysql_connect function to connect to a mysql database kept getting the error message

“mysql_drop_db could not be located in the dynamic link library libmysql.dll”

Now I had moved the libmysql.dll into the c:\windows\system32 directory, uncommented the extension in php.ini but was still getting this message, eventually realised that the new libmysql that comes with versions 4 & 5 of mysqlsql dont have these functions in them any more.  Therefore when you use php5 you must put libmysql.dll from the php5 zip file into the windows directory otherwise you get the above error.

I am not sure if you will lose functionality or not by doing this as the mysql engine will still use what ever version is in mysql/bin (from installation) but the current version php5 is compiled against mysql version 3 and still needs the function defs of that version.