If you have installed PHP 5.2.2 and MySQL on a Windows machine, it is more likely that you will encounter this error on all PHP pages that you have in your IIS.
Error in my_thread_global_end(): 1 threads didn’t exit
The work-around would to be to replace the PHP 5.2.2 version of libmysql.dll with the version available on mysql.com website. Only the libraries used for the mysql.com distributions contain the latest bug fixes and can use all the features of the MySQL Server versions 4.1.21 and 5.0.27.
You can download the DLL’s from http://dev.mysql.com/downloads/connector/php/
The PHP 5.1 distribution that is available on php.net is linked against an old version of the MySQL Client API library. The mysql and mysql extensions from php.net are based on the MySQL Client API version 4.1.7. The MySQL Client API versions used for the mysql.com downloads are 4.1.21 and 5.0.27.