嗨我試圖在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