In this post we will learn how to install the Php OAuth extension on Ubuntu and Mac OSX.
PEAR is necessary to install PECL, with PECL we will install OAuth extension.
If are you using Mac OSX, can see how to install PEAR in this tutorial.
If are you using ubuntu, you can install PEAR via apt-get like this:
sudo apt-get install php-pear
You will also need additional PHP modules (like PECL) that can be installed as follows:
sudo apt-get install php5-dev sudo apt-get install libcurl3-openssl-dev
Installing HTTP and OAuth extensions
With PECL and PEAR once installed we can now install OAuth extension.
Run from your terminal:
sudo pecl install pecl_http sudo pecl install oauth
After this, open your php.ini and add the follows:
If you got this error installing oauth:
pcre.h: No such file or directory
On Ubuntu, run this and try again:
apt-get install libpcre3-dev
On Mac OS, install Macports, run this and try again:
sudo port install autoconf sudo port install pcre sudo cp /opt/local/include/pcre.h /usr/include/
Ready! OAuth PHP Extension is installed.