Hi proxene,
just for your knowledge:
If you install for example SSH2 with pecl, then you could have used "
pecl install ssh2". This process doesn't install the package for additional PHP versions - it installs it for your basic vendor version on your server.
If you desire additional extensions for Plesk-PHP - versions, you have to install them for example with the command(s):
/opt/plesk/php/X.X/bin/pecl install ssh2
... where
X.X is the Plesk-PHP version, you want the desired extension to be installed for. Pls. note, that
NOT ALL PECL - extensions are compatible with all PHP - versions. Especially with PHP 7, there are now either new extensions, or even none, which can be installed. When you use the command "
pecl install PACKAGE-NAME", always the latest stable version will be used, which doesn't automatically mean, that this version is compatible with your desired PHP version. A possible example for this is:
/opt/plesk/php/7.0/bin/pecl install memcached
You will see the message:
pecl/memcached requires PHP (version >= 5.2.0, version <= 6.0.0, excluded versions: 6.0.0), installed version is 7.0.9
No valid packages found
install failed
In such case, you have to look at the PECL - homepage and search for the package ( =>
https://pecl.php.net/package-search.php ). If you did that, you will be informed with this actual informations:
Dependencies
Release 2.2.0: PHP Version: PHP version 6.0.0 or older
PHP Version: PHP 5.2.0 or newer
PEAR Package: PEAR 1.4.0b1 or newer
Release 2.2.0RC1: PHP Version: PHP version 6.0.0 or older
PHP Version: PHP 5.2.0 or newer
PEAR Package: PEAR 1.4.0b1 or newer
Release 2.2.0b1: PHP Version: PHP version 6.0.0 or older
PHP Version: PHP 5.2.0 or newer
PEAR Package: PEAR 1.4.0b1 or newer
You see, there is no available "memcached" version for PHP 7 which you could install with PECL.
Now back to your issue, that you only installed SSH2 for your basic, vendor PHP version:
Pls. consider to use for an actual Plesk-PHP version 7.0.9 the command:
/opt/plesk/php/7.0/bin/pecl install ssh2
You will see, that this doesn't work and a research at the PECL - homepage will show you why:
ssh2 1.0 and above is PHP 7 only. To install a version that is PHP 5 compatible you can run 'pecl install ssh2-0.13'
1. You will have to use the command:
/opt/plesk/php/7.0/bin/pecl install ssh2-1.0
2. Afterwards, to
enable the new ssh2 extension, you have to add it to your "php.d" - folder, so that it will load, when you use Plesk-PHP 7:
echo "extension=ssh2.so" > /opt/plesk/php/7.0/etc/php.d/ssh2.ini
3. And finally, you want the Plesk php-handler to know, that you installed a PHP extension, so pls. perform the command:
plesk bin php_handler --reread
( Now you are able to see the new extension as well over the Plesk Control Panel:
Home > Tools & Settings > PHP-Settings > 7.0.9 XXX application )
If you experience any issues/errors when installing a PECL extension(s), pls. inform about your procedure to install your extension, so that people willing to help you don't have to write such a whole book, like I did here.