FirstServed Tech Blog - FirstServed and the Art of Server Tuning

“Error in my_thread_global_end(): 1 threads didn’t exit” with MySQL and PHP on Windows

With a fresh install of PHP and MySQL on a Windows 2003 server you may get the following error when loading pages in IIS that use MySQL database calls in PHP:

Error in my_thread_global_end(): 1 threads didn’t exit

This is due to an incompatibility problem between MySQL and the PHP libmysql dll.
For PHP release 5.2.1 the following fix worked:

  1. Rename the libmysql.dll file in the PHP installation directory
  2. Download the PHP 5.2.1 Windows Binary from the PHP website ( http://www.php.net/releases/)
  3. Replace the libmysql.dll with the one from the package you just downloaded


 

Leave a Reply

You must be logged in to post a comment.