How to install PHP extension locally on WAMP?

耗尽温柔 提交于 2019-11-30 00:57:53
plague

Get the precompiled dll from http://downloads.php.net/pierre/

Search the page for oauth and choose the one for your machine.

Put that .dll file in your PHP extensions directory. Find the extensions area in your php.ini file and add this to it:

[PHP_OAUTH]
extension=php_oauth.dll

restart WAMP server

The PHP site gives great instructions on how to install PHP extensions on Windows. Just Find the *.dll in the PECL, and follow these instructions. You can get the OAuth library here.

I had the same issues trying to set this up myself. A lot of the information on stackoverflow on this subject is good but outdated. You can get the latest oAuth libraries on the php.net site here now:

http://windows.php.net/downloads/pecl/releases/oauth/

However, I also had some issues getting it to work with WAMP since the version of PHP they provided was out of date and didn't work with the extensions there. To fix this I had to manually add php versions to WAMP. You can follow this guide on how to do that:

http://www.websanova.com/tutorials/php/manually-adding-php-versions-to-wamp

I'm using WAMPServer (x64) with PHP5.6.25 & I want to install "Blesta", the requirements need "Pecl - Mailparse", So:

  1. I download "PHP Mailparse v2.1.6 (PHP v5.6)(Thread Safe)(vc11)(x64)"
  2. I extract the download file in "C:\wamp64\bin\php\php5.6.25\ext" folder
  3. I add "extension=php_mailparse.dll" to file "C:\wamp64\bin\php\php5.6.25\phpForApache.ini" but at the end of "Dynamic Extensions"
  4. Restart the WAMPServer
  5. Install "Blesta"

Note for #3 Example:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll

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