I have been trying for a while to get the SSH 2 extension for php installed on my CentOS 5.6 x64 server. I started the server from scratch and here are the steps I have taken
After this I run php -m to see the php modules and ssh2 is not listed. I have been searching forever for tutorials and have found a few but from what I can see I have done everything correctly. Can anyone see where I am going wrong. I can provide any config files you may need. Also I have hear about phpseclib and was wondering if this would be an easier/better route? Any help would be greatly appreciated!
You could maybe try phpseclib, a pure PHP SFTP implementation, instead. eg.
<?php
include('Net/SFTP.php');
$sftp = new Net_SFTP('www.domain.tld');
if (!$sftp->login('username', 'password')) {
exit('Login Failed');
}
echo $sftp->pwd() . "\r\n";
$sftp->put('filename.ext', 'hello, world!');
print_r($sftp->nlist());
?>