嗨我试图在php中实现线程。到目前为止,我读过的所有东西我都知道pthreads库可以用于这个目的。php_pthreads.dll - 指定的模块找不到。?
我已经通过下面的PHP安装指南了:
http://docs.php.net/manual/en/pthreads.installation.php
下载并行线程Windows安装拉链后,我解压缩到相应位置就&放在以下文件:
移动
php_pthreads.dll to the 'bin\php\ext\' directory.
Move pthreadVC2.dll to the 'bin\php\' directory.
Move pthreadVC2.dll to the 'bin\apache\bin' directory.
Move pthreadVC2.dll to the 'C:\windows\system32' directory.
配置php \ php.ini并添加
extension=php_pthreads.dll
但我正在逐渐在服务器启动时的错误,如下所示:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pthreads.dll' - The specified module could not be found.
in Unknown on line 0
我无法检测到的是上面的文件php_pthreads.dll的问题@given位置,有什么可以去错误。
xampp的PHP版本:5.6.15,Pthreads lib版本:3.1.0这两个软件都是用于x86架构的。
我做出改变的埼玉县以下的建议,改变了并行线程的版本从3.1.0到2.0.0我得到了如下新的警告:
PHP Warning: PHP Startup: pthreads: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0
如何我匹配这些编译版本的API我有PHP扩展内部版本号为20131226,但是如何在下载pthread二进制安装zip时决定这个数字?
我会建议你,如果可能的话,通过编译源代码来构建'pthreads'。或者下载与您的PHP版本匹配的pthreads版本。 – Ikari
如何在下载时检查pthreads的编译版本我知道php编译版本? – pcj