How to install PHP extension locally on WAMP?

假装没事ソ 提交于 2019-11-30 11:40:06

问题


I've never done this, so I'm looking for detailed guidance. I'm trying to use the Evernote API to create a PHP page. I've downloaded their SDK and it says I need to install OAuth extension for PHP. I have WAMPSERVER installed on my local machine (Windows 7). I've tried reading the manual but I can't even figure out what to download :S Is this a fairly straightforward process?

http://php.net/manual/en/book.oauth.php


回答1:


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




回答2:


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.




回答3:


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



回答4:


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



来源:https://stackoverflow.com/questions/6803265/how-to-install-php-extension-locally-on-wamp

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