Not able to install pThread on Windows Xampp

╄→尐↘猪︶ㄣ 提交于 2019-12-04 11:35:20

问题


Update: Looks like I am not doing anything wrong here. When I execute a thread example, it works fine. I am not sure, then why am I getting those errors when I start Apache.

Any ideas?


I am trying to install pThread on Xampp (Windows 7) as follows:

  1. My PHP version information: 5.4.7 VC9 x86

  2. I have downloaded php_pthreads-0.0.45-5.4-ts-vc9-x86.zip

  3. Then I added pthreadVC2.dll to C:\xampp\php and php_pthreads.dll to C:\xampp\php\ext
  4. In php.ini, I have added extension=php_pthreads.dll
  5. Restarted Apache server and received following error:

Any suggestions on why this is not working?


回答1:


I do not use Windows, but according to the people commenting in the manual, you must also add:

LoadFile "C:/xampp/php/pthreadVC2.dll"

to your httpd.conf (httpd-xampp.conf the manual mentions)




回答2:


Here is what I did and works for me:

  1. Check your PHP's compiler version using phpinfo() as you have already done. Mine and your both is VC9
  2. Download and install proper Pthread package that matches your compiler version. I downloaded "php_pthreads-0.0.45-5.4-ts-vc9-x86.zip" file. Make sure your OS version also mathes (32-bit or 64-bit).
  3. Extract Zip file in a temp folder
  4. Copy php_pthreads.dll to the 'bin\php\ext\' folder
  5. Copy pthreadVC2.dll to the 'bin\php\' folder
  6. Copy pthreadVC2.dll to the 'bin\apache\bin' folder
  7. Copy pthreadVC2.dll to the 'C:\windows\system32' folder
  8. Open php\php.ini and add "extension=php_pthreads.dll" without quotes at the end of file
  9. Restart server and you won't get any error message.

Good luck




回答3:


copy "pthreadVC2.dll" file to "windows/system32" directory.then restart apache. It worked for me.



来源:https://stackoverflow.com/questions/18819784/not-able-to-install-pthread-on-windows-xampp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!