Applicable to:Question
How to install the OAuth PHP extension for Plesk PHP?
AnswerNote: 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.
1.Connect to a Plesk server via SSH.
2.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
3.Install OAuth:
# /opt/plesk/php/7.4/bin/pecl install oauth
4.Enable the extension:
# echo extension=oauth.so > /opt/plesk/php/7.4/etc/php.d/oauth.ini
5.Verify that OAuth is now enabled:
# /opt/plesk/php/7.4/bin/php -m | grep OAuth
OAuth
6.Refresh the information about PHP handlers in Plesk:
# plesk bin php_handler --reread
7.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.