How do I fix PHP module thread-safe/non-thread-safe mismatch?

旧巷老猫 提交于 2019-11-27 07:14:02

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/3271798/how-do-i-fix-php-module-thread-safe-non-thread-safe-mismatch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!