PHP的SSH2模块加载? 或不?

我们有一个Ubunutu 9.04盒子,我们有问题。 具体来说,似乎并没有使用PHP加载PECL SSH2模块。

确保libssh2被加载..它是。

root@live1:~# apt-get install libss2 Reading package lists... Done Building dependency tree Reading state information... Done libss2 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 77 not upgraded. 

然后,我们确保PHP PECL模块安装….它是。

 root@live1:~# pecl install channel://pecl.php.net/ssh2-0.11.0 Skipping package "pear/ssh2", already installed as version 0.11.0 No valid packages found install failed 

我们确保php.ini正在加载模块…线路在那里。

 ; Note that it should be the name of the module only; no directory information ; needs to go here. Specify the location of the extension with the ; extension_dir directive above. extension=ssh2.so 

我们重新启动Apache并检查加载的模块。 蟋蟀。

 root@live1:~# php -m|grep ssh2 root@live1:~# 

任何人都知道这里发生了什么? 诚然,我不是一个服务器的人…我是一个开发人员。 但是我们没有服务器的人。 🙂

确保你正在编辑正确的PHPconfiguration。 Apache模块使用的可以是PHP cli使用的文件。 您可以使用php --ini来查看使用的configuration文件。