Multithreading PHP7启动:pthreads:无法在Windows 7中初始化模块pthreads

Multithreading PHP7启动:pthreads:无法在Windows 7中初始化模块pthreads,multithreading,php-7,Multithreading,Php 7,我成功地在Windows 7 Enterprise上安装了以下内容: httpd-2.4.25-win64-VC14 php-7.1.1-Win32-VC14-x64 (Thread Safe (2017-Jan-18 21:06:35)) php_pthreads-3.1.6-7.0-ts-vc14-x64 from http://windows.php.net/downloads/pecl/releases/pthreads/3.1.6/ phpinfo页面外观良好,线程安全=已启用 我遵

我成功地在Windows 7 Enterprise上安装了以下内容:

httpd-2.4.25-win64-VC14
php-7.1.1-Win32-VC14-x64 (Thread Safe (2017-Jan-18 21:06:35))
php_pthreads-3.1.6-7.0-ts-vc14-x64 from http://windows.php.net/downloads/pecl/releases/pthreads/3.1.6/
phpinfo页面外观良好,线程安全=已启用

我遵循了
phppthreads-3.1.6-7.0-ts-vc14-x64
包的README.md文件中的所有说明

但是,当我执行“php-m”时,出现了以下错误:

PHP Warning:  PHP Startup: pthreads: Unable to initialize module
Module compiled with module API=20151012
PHP    compiled with module API=20160303
These options need to match
 in Unknown on line 0

Warning: PHP Startup: pthreads: Unable to initialize module
Module compiled with module API=20151012
PHP    compiled with module API=20160303
These options need to match
 in Unknown on line 0
[PHP Modules]
bcmath
calendar
Core
ctype
date
。。。
我以前在PHP5.4.33中使用过线程,但我决定升级到PHP7以支持tlsv1.1和tlsv1.2。出现错误的原因是pthread dll与安装的PHP版本不兼容

根据最新版本,windows将不支持PHP7.0或7.1,因为在ASE版本中ZTS被破坏

因此,如果您在windows上,并且希望使用pthread。。您必须降级到PHP5.6,或者等待PHP7.2和下一版本的PHPpthreads

另一种选择是使用php_pthreads的测试版:

我有完全相同的错误,但在windows 10和php 7.1.6上