【问题标题】:PHP: Error in my_thread_global_end(): 1 threads didn't exitPHP:my_thread_global_end() 中的错误:1 个线程未退出
【发布时间】:2010-09-19 17:32:04
【问题描述】:

在 CLI 模式下运行 PHP 时,大多数时间(并非总是),脚本将在执行结束时挂起大约 5 秒,然后输出:

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

它似乎实际上对脚本本身没有任何影响。

一些网络搜索出现了建议用不同版本替换 php_mysql.dll 的博客,但这并没有解决我的问题,我怀疑这些博客中的信息现在已经过时了。

我的设置:

  • PHP 版本 5.2.4
  • Apache/2.2.4 (Win32)
  • Windows Vista 家庭高级版 SP1

【问题讨论】:

    标签: php mysql


    【解决方案1】:

    你看过this resource吗?您可能需要仔细检查您是否有一个不受此影响的特定 libmysql.dll (5.2.1),并且还要仔细检查您周围没有任何杂散的 mysql 库,PHP 可能会取而代之。或者,如果您愿意,可以从 FastCGI 切换。

    为了利益起见,该错误似乎最好详细说明here。问题的总体思路(来自 mysql bug 链接)似乎是:

    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.
    

    【讨论】:

    • 嘿,漂亮的颜色! :-p 尝试使用 blockquote ("> text") 而不是缩进,这样可以突出显示语法。
    【解决方案2】:

    这是 windows fast-cgi 实现中某些 PHP 5.2.X 版本的已知错误

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

    我之前遇到过这个错误,将我的 PHP 安装降级到 5.2.0 解决了这个问题。

    【讨论】:

      【解决方案3】:

      无需降级整个 ​​PHP 版本,只需替换 PHP 5.2.1 版本 中的 libmysql.dll 即可:) 参考@ 987654321@了解更多信息。

      【讨论】:

        猜你喜欢
        • 2020-01-16
        • 2013-12-06
        • 1970-01-01
        • 2011-05-04
        • 1970-01-01
        • 2014-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多