INSTALL OAUTH FOR PHP 5.X
To install oauth on your system, you need to perform the following steps with your root user. Be aware that this example is for PHP 5.6, you should install the corresponding packages for your PHP version.
- Install php-dev extension (using the corresponding PHP version):
1sudo apt-get install php5.6-dev - Run the following command to compile the files:
1sudo apt-get install gcc make autoconf libc-dev pkg-config
- Install oAuth itself (using the corresponding PHP version):
1sudo apt-get install php5.6-oauth - In this step, you should now be able to see the module available under /etc/php/5.6/mods-available.
- If you do not see oauth.ini, then review previous steps to check if you had installed oAuth for the right version of PHP.
- Add the module on your php.ini file in order to recognize it:
1echo "extension=oauth.so" >> /etc/php/5.6/apache2 - Restart apache:
1sudo service apache2 restart - That’s all. If you run a phpinfo(), you should now see oauth section. Just like that: