8
$connection = ssh2_connect($SFTP_SERVER, 22);
ssh2_auth_password($connection,$SFTP_USERNAME,$SFTP_PASSWORD);
$sftp = ssh2_sftp($connection);

Fatal error: Call to undefined function ssh2_connect() in /var/www/html/beta/0sftp.php on line 33

my system is CentOS 6.4 all the required extensions is installed but I don't know how to verify.

Raptor
  • 53,206
  • 45
  • 230
  • 366
user2807431
  • 89
  • 1
  • 1
  • 3

2 Answers2

9

try to run the command :

yum install php-pecl-ssh2

Moshe Zino
  • 311
  • 1
  • 4
4

For whatever it is worth, I tested the installation from the command line

php -i | grep ssh

and it was OK, but it did not work in a web page; took me a couple of minutes to remember I have to re-start Apache after installation :)

JP Dippenaar
  • 171
  • 3