Can someone help please? The command: pecl install ssh2-0.13 Outputs: pecl/ssh2 requires PHP (version >= 4.0.0, version <= 6.0.0), installed version is 7.0.22-0ubuntu0.16.04.1 How can I install it to my php 5.6 ? ( php.ini file location is /opt/php-5.6.30/lib/php.ini )
Some more information. When I installed the second php version I've used this howto: https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/ I've tried to install it the same way xDebug is being installed in that guide. cd /opt/php-5.6.30/etc pecl -C ./pear.conf update-channels pecl -C ./pear.conf install ssh2 But I get the same error message: pecl/ssh2 requires PHP (version >= 4.0.0, version <= 6.0.0), installed version is 7.0.22-0ubuntu0.16.04.1 I will appreciate any help you can provide. Thank you very much,
Thank you for your answer, As for PHP7 - you are correct, the apt package is the best solution. As I wrote, I'm looking for a solution for the pecl ssh2 installation for php 5.6. The main problem is PECL only detects the php7 installation even though I've entered the -C tag which supposed to load a custom configuration for the php 5.6 installation. Have a nice day.
Done by changing the pecl script to always work through php5.6 version ( I've 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" )
1. The client has a system that does not support php7 and needs ssh2 extension installed over php5.6 . 2. I've already noticed that you keep answering useless answers. Not only to me. Thanks for trying helping me, but if you do not know the answer or a lead to the answer - please don't write useless words.
Did you try to use the pecl of the compiled version instead, e.g.: /opt/php-5.6.30/bin/pecl -C ./pear.conf update-channels