我需要在 php 中启用 ZTS。因此,我使用“--enable-maintainer-zts”选项从源代码重新编译了 php。现在我有:
“php -v”
PHP 7.0.11 (cli) (built: Oct 3 2016 12:19:10) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
Run Code Online (Sandbox Code Playgroud)
“php -i”
Thread Safety => enabled
Run Code Online (Sandbox Code Playgroud)
现在我正在尝试做
“sudo pecl install pthreads”来回答我
checking whether to enable pthreads... yes, shared
checking whether to enable AddressSanitizer for pthreads... no
checking whether to enable dmalloc for pthreads... no
checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled …Run Code Online (Sandbox Code Playgroud) 为什么ZTS默认是禁用的,需要编译PHP源码才能实现Threading?启用时是否有任何限制或副作用ZTS?它不稳定吗?
我在github PThread项目页面上看到支持php7 +.
我在ubuntu发行版上有php7.1.6(16.04)
我找不到任何提供php7.1-zts的PPA.
如何在php7.1上启用zts来安装pthreads?