Applicable to:
- Plesk for Linux
Question
How to install the OAuth PHP extension for Plesk PHP?
Answer
Note: In the example below, the OAuth PHP extension is installed for PHP version 7.2 provided by Plesk. For other PHP versions, replace "7.2" with a required PHP version (for example, "5.6" or "7.0"). Use this guide to install additional PHP versions.
-
Connect to a Plesk server via SSH.
-
Install components required for OAuth installation:
-
on CentOS/RHEL-based distributions:
# yum install plesk-php72-devel make gcc php-pear pcre-devel
-
on Debian/Ubuntu-based distributions:
# apt-get install plesk-php72-dev gcc make autoconf libc-dev pkg-config
-
-
Install OAuth:
# /opt/plesk/php/7.2/bin/pecl install oauth
-
Enable the extension:
# echo extension=oauth.so > /opt/plesk/php/7.2/etc/php.d/oauth.ini
-
Verify that OAuth is now enabled:
# /opt/plesk/php/7.2/bin/php -m | grep OAuth
-
Refresh information about PHP handlers in Plesk:
# plesk bin php_handler --reread
This extension will also appear in Plesk at Tools & Settings > PHP Settings > 7.2 any application.
Comments
3 comments
This is a partial solution. Installs yes, but curl is not included as a Request Engine, only streams
Hello Jack Lee,
The solution provided in this guide works 100% but indeed uses phpstreams as request engine yes.
If you want to change to curl request engine you may try the steps for example as shown here https://talk.plesk.com/threads/curl-request-engine-for-php-oauth-extension.343224/
I suggest trying this in a non-production server just in case, as this hasn't been officially tested.
Hello,
Have tried this with 7.4 and while all looks good through install, Oauth is not showing up within 7.4 listing. Installing prior versions has worked out well, for some reason this version is not showing up after re-reading handler.
Is there any additional steps for this version?
Please sign in to leave a comment.