Skip to content
Advertisement

2 php versions installed(5.6&7) how to add pecl ssh2 ext only to the 5.6 installation?

I’ve installed 2 php versions on my server (which is managed by ISPconfig 3) using this howto: https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/

I’m trying to add pecl ssh2 extension only to my 5.6 installation.

cd /opt/php-5.6.30/etc
pecl -C pear.conf install ssh2-0.13

pecl/ssh2 requires PHP (version >= 4.0.0, version <= 6.0.0), installed version is 7.0.22-0ubuntu0.16.04.1 

Any help will be appreciated!

Advertisement

Answer

Done by changing the pecl script to always work through php5.6 version

Edited:

nano /usr/bin/pecl 

And added this line after the first code block (after it checks the php version )

PHP="/opt/php-5.6.30/bin/php"

Don’t forget to change it back after installation.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement