pthreads不支持apache2handler SAPI

现在已经有几个星期了,我无法安装pthread。 我将列出错误日志,然后列出我的configuration选项。
这些是我得到的错误:
(Apache错误日志)

第0行的Unknown中的pthreads不支持apache2handler SAPI

apachectl -V输出

Server version: Apache/2.4.18 (Unix) Server built: Jan 10 2016 14:54:48 Server's Module Magic Number: 20120211:52 Server loaded: APR 1.4.8, APR-UTIL 1.5.2 Compiled using: APR 1.4.8, APR-UTIL 1.5.2 Architecture: 64-bit Server MPM: worker threaded: yes (fixed thread count) forked: yes (variable process count)

同时PHP错误日志:
(PHP错误日志)
bin / php -m
PHP Warning: Module 'pthreads' already loaded in Unknown on line 0 [PHP Modules] Core date pcre pthreads Reflection SPL standard

没有其他ini文件加载extension=pthreads.so ,所有这些错误只发生在我将extension=pthreads.so包含到php-cli.ini文件中时。

没有php-cli.ini文件, php -m列出这些模块:bin / php -m
[PHP Modules] Core date pcre Reflection SPL standard

在这一点上PHP和APACHE工作完美,除了pthreads类不被识别。

Apache Configuration Options ./configure \ --prefix=path/apache \ --exec-prefix=path/apache \ --with-pcre=path/apache/pcre \ --enable-module=so \ --with-mpm=worker

PHPconfiguration选项 ./configure \ --prefix=path \ --exec-prefix=path \ --with-apxs2=path/apache/bin/apxs \ --with-config-file-scan-dir=path/php/lib \ --with-config-file-path=path/php/lib \ --disable-all \ --enable-maintainer-zts \ --enable-pthreads=shared

因为一次又一次,pthreads不被apache(PHP-CGI)支持,只能通过CLI版本

https://github.com/krakjoe/pthreads

SAPI支持

pthreads v3仅限于在CLI中操作:我已经花了很多年的时间来试图解释在web服务器中的线程没有意义,在1,111承诺pthreads之后,我意识到这一点,我的build议是不理睬的。

所以我正在推广这个build议,坚持和坚持:除了CLI之外,你不能安全,合理地使用pthread。

感谢收听 ;)