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.4 provided by Plesk. For other PHP versions, replace "7.4" with a required PHP version. Refer this guide to install additional PHP versions.
-
Connect to a Plesk server via SSH.
-
Install the packages required for OAuth installation:
-
on CentOS/RHEL-based distributions:
# yum install plesk-php74-devel make gcc php-pear pcre-devel
-
on Debian/Ubuntu-based distributions:
# apt-get install plesk-php74-dev gcc make autoconf libc-dev pkg-config
-
-
Install OAuth:
# /opt/plesk/php/7.4/bin/pecl install oauth
-
Enable the extension:
# echo extension=oauth.so > /opt/plesk/php/7.4/etc/php.d/oauth.ini
-
Verify that OAuth is now enabled:
# /opt/plesk/php/7.4/bin/php -m | grep OAuth
OAuth -
Refresh the information about PHP handlers in Plesk:
# plesk bin php_handler --reread
-
Refresh the information about server components in Plesk:
# plesk sbin packagemng -sdf
This extension will also appear in Plesk at Tools & Settings > PHP Settings > 7.4 any application.