PHP: Error in my_thread_global_end (): 1 thread did not exit

When starting PHP in CLI mode most of the time (not always), the script will hang at the end of execution for about 5 seconds, and then prints this:

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

In fact, this does not affect the script itself.

Some web search blogs have blogs that offer replacing php_mysql.dll with a different version, but this did not solve the problem for me, and I suspect that the information from these blogs is now out of date.

My setup:

  • PHP Version 5.2.4
  • Apache / 2.2.4 (Win32)
  • Windows Vista Home Premium SP1
+3
source share
3 answers

This is a known bug with some versions of PHP 5.2.X in the fast-cgi implementation on Windows.

http://bugs.php.net/bug.php?id=41350&edit=1

PHP 5.2.0.

+1

PHP, libmysql.dll PHP 5.2.1, :) . .

+1

Have you looked at this resource ? You can double check that you have a specific libmysql.dll (5.2.1) that is not affected by this, and double check if you have any stray mysql libraries that lie around this PHP, instead you can pick up . Or, switch from FastCGI if this is an option for you.

In the interest of interest, the error looks in more detail here . The general idea of ​​the problem (from the mysql bug link) is as follows:

Whenever a new thread is created libmysql is told about that by Windows. It then     
increases a thread counter and initializes some data. When libmysql is being unloaded
it checks whether all threads have finished, if not it tries to tell them "close now"
and gives them 5 seconds for that. In general this works in a nice way.
0
source

Source: https://habr.com/ru/post/1698843/


All Articles