[英]SSH2 PHP Extension
I have been trying for a while to get the SSH 2 extension for php installed on my CentOS 5.6 x64 server. 我已经尝试了一段时间,以在我的CentOS 5.6 x64服务器上安装php的SSH 2扩展。 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. 在此之后,我运行php -m来查看php模块,并且未列出ssh2。 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?
我也听说过phpseclib,并且想知道这是否是更容易/更好的途径? Any help would be greatly appreciated!
任何帮助将不胜感激!
You could maybe try phpseclib, a pure PHP SFTP implementation , instead. 您也许可以尝试phpseclib,它是纯PHP SFTP实现 。 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());
?>
Make sure /etc/php.ini is actually used. 确保/etc/php.ini被实际使用。 check php --info output to see the used ini file(s)
检查php --info输出以查看使用的ini文件
At least on debian the path would be /etc/php5/cli/php.ini 至少在debian上,路径为/etc/php5/cli/php.ini
也许没有区别,但是如果还没有这样,请尝试:
extension="ssh2.so"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.