Windows下PHP多線程擴展pthreads的安裝

pthreads擴展安裝步驟

一、查看phpinfo()

獲取PHP版本號及位數(x86表示32位x64表示64位)、編譯器版本、PHP配置文件加載所在位置等。以下圖所示:php

二、pthreads擴展下載地址http://windows.php.net/downloads/pecl/releases/pthreads/

三、在擴展列表中找到對應版本

四、php_pthreads-2.0.9-5.5-ts-vc11-x86.zip參數詳解

  • 2.0.9表明pthreads的版本號
  • 5.5表明php的版本號
  • ts表示php是線程安全版本
  • vc11表示php要MSVC11 (Visual C++ 2012)編譯器編譯
  • x86則表示PHP版本是32位

五、解壓縮包

  • 複製php_pthreads.dllD:\wamp\bin\php\php5.5.12\ext\目錄下
  • 複製pthreadVC2.dllD:\wamp\bin\php\php5.5.12\目錄下
  • 複製pthreadVC2.dllD:\wamp\bin\apache\apache2.4.9\bin目錄下
  • 複製pthreadVC2.dllC:\windows\system32目錄下

六、打開phpinfo()Loaded Configuration File所指定加載的php.ini配置文件並在末尾添加

extension=php_pthreads.dll

七、重啓wamp服務器

重啓服務器後,查看phpinfo()就能看到pthreads擴展就表示安裝成功,以下圖:html

【參考資料】

相關文章
相關標籤/搜索