如何修复 PHP 模块线程安全/非线程安全不匹配的问题?

发布于 2024-09-10 10:49:21 字数 922 浏览 8 评论 0原文

这是错误日志中的内容:

PHP Warning: PHP Startup: BOPEE Extension: Unable to initialize module
Module compiled with build ID=API20090626,TS,VC9
PHP    compiled with build ID=API20090626,NTS,VC9
These options need to match
 in Unknown on line 0

PHP Warning:  PHP Startup: CustomExt Module: Unable to initialize module
Module compiled with build ID=API20090626,TS,VC9
PHP    compiled with build ID=API20090626,NTS,VC9
These options need to match
 in Unknown on line 0

How I get the non-threadsafe source for PHP?我在 windows.php.net/download 上找到的唯一下载链接是 http://windows.php.net/downloads/releases/php-5.3.2-src.zip 这似乎是线程安全代码 --- 或者是否有某种方法告诉源代码它是实际上是非线程安全的?

我尝试将 --disable-zts 放在 configure.bat 的命令行上,但这对 configure.bat 的输出有很好的效果>,它似乎并没有使源的线程安全性降低。

This is out of the error log:

PHP Warning: PHP Startup: BOPEE Extension: Unable to initialize module
Module compiled with build ID=API20090626,TS,VC9
PHP    compiled with build ID=API20090626,NTS,VC9
These options need to match
 in Unknown on line 0

PHP Warning:  PHP Startup: CustomExt Module: Unable to initialize module
Module compiled with build ID=API20090626,TS,VC9
PHP    compiled with build ID=API20090626,NTS,VC9
These options need to match
 in Unknown on line 0

How I get the non-threadsafe source for PHP? The only download link I found on windows.php.net/download was http://windows.php.net/downloads/releases/php-5.3.2-src.zip and that appears to be the threadsafe code --- or is there some way of telling the source that it's actually non-threadsafe?

I have tried putting --disable-zts on the commandline for configure.bat but whilst that has a good effect on the outputs from configure.bat, it doesn't seem to make the source any less threadsafe.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

请爱~陌生人 2024-09-17 10:49:21

在上面的例子中,PHP 本身是非线程安全的(NTS),但模块是线程安全的(TS)。该模块是线程安全的,因为定义了 Zend 线程安全 ZTS 常量(在模块的源代码中或在 VS 2008 的预处理器定义中)。

仅将 ZTS=1 更改为 ZTS=0不起作用
您必须完全删除 ZTS 的定义。

In your case above, PHP itself is non-thread-safe (NTS), but the module is thread-safe (TS). The module is thread-safe because the Zend Thread-Safe ZTS constant is defined (either in the module's source code or in VS 2008's Preprocessor Definitions).

Simply changing ZTS=1 to ZTS=0 does not work.
You must completely remove the definition of ZTS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文