开发者

How to install PHP extension locally on WAMP?

开发者 https://www.devze.com 2023-03-22 06:29 出处:网络
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'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 proce开发者_开发知识库ss?

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


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'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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消