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.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.
Comments
2 comments
I tried the 3rd step and I got this error:
"checking pcre.h usability... no checking pcre.h presence... no checking for pcre.h... no configure: error: Couldn't find pcre.h, try installing the libpcre development/headers package ERROR: `/tmp/oauth/configure --with-php-config=/opt/plesk/php/7.4/bin/php-config' failed"
To fix this issue, you need to install the PCRE development package on your server:
sudo apt-get install libpcre3-dev
After that, it all worked fine.
how to install php 5.4 version pls tell me step by step
Please sign in to leave a comment.