0

I want to use SSH2 with zendframework. Also need steps for installation and configuration with wamp server. PHP function ssh2_connect is not working.

It showing the following error:

Fatal error: Call to undefined function ssh2_connect() in /home/chaosnz/public_html/fotosnap.net/test.php on line 2

How can I deal with this?

Thanks

Xearinox
  • 3,224
  • 2
  • 24
  • 38

1 Answers1

0

Run:

/usr/local/zend/bin/pecl install ssh2 channel://pecl.php.net/ssh2-0.12

I was having the same problem. /usr/local/zend/bin/pecl install ssh2 outputs:

Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install
install failed

When I added channel://pecl.php.net/ssh2-0.12 it compiled fine. It will then ask you:

You should add "extension=ssh2.so" to php.ini

I've added that to /usr/local/zend/etc/conf.d/ssh2.ini, restarted httpd and now ssh2_connect() is working. Good luck!