PHP SSH2 模块已加载?还是未加载?

PHP SSH2 模块已加载?还是未加载?

我们有一个 Ubunutu 9.04 机器,但遇到了问题。具体来说,PECL SSH2 模块似乎没有随 PHP 一起加载。

确保 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:~# 

有人知道这是怎么回事吗?诚然,我不是服务器人员……我是一名开发人员。但我们没有服务器人员。:-)

答案1

确保您编辑的 PHP 配置正确。Apache 模块使用的配置可能与 PHP cli 使用的文件不同。您可以使用它php --ini来查看使用了哪些配置文件。

相关内容