0

I've installed PHP 7.1 from Software Collections and running on rh-php71-php-fpm. Now i need to use ssh2 to connect to my SFTP, it doesn't come with the Software Collection one. How do i go about installing it?

I've tried installing with these instructions: http://programster.blogspot.com/2013/06/centos-64-install-ssh2-extension-for-php.html

Then copying the .so file over to where the other modules are located for the SC installation: /opt/rh/rh-php71/root/usr/lib64/php/modules/ssh2.so then gave it +x

then added the ini, where the others are located: /etc/opt/rh/rh-php71/php.d/ssh2.ini

restarted rh-php71-php-fpm and httpd but the function ssh2_connect is still undefined.

Any help?

Lew Keyang
  • 11
  • 5
  • is it because when i run `pecl install -f ssh2`, its installing for php 5.4? (the base php version) so when i cp the .so over to the rh-php71 module directory it can't be read? – Lew Keyang Dec 18 '18 at 03:57
  • "Then copying the .so file over" what .so file? Is it appropriate for this build of PHP? – miken32 Dec 18 '18 at 04:31

1 Answers1

1

Sorry did more searching and all i had to do was install sclo-php71-php-pecl-ssh2

Lew Keyang
  • 11
  • 5