Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have an Ubunutu 9.04 box that we are having problems with. Specifically, it does not seem the PECL SSH2 module is being loaded with PHP.

Making sure libssh2 is loaded.. it is.

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.

Then, we make sure the PHP PECL module is installed.... it is.

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

We make sure php.ini is loading the module... the line is there.

; 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.

We restart Apache and check for the loaded module. Crickets.

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

Anyone have any idea what's going on here? Admittedly, I'm not a server guy... I'm a developer. But we don't have a server guy. :-)

share|improve this question
did you mean to type apt-get install libssh2 and not libss2 ? –  cpbills Jul 28 '10 at 16:34
Yes, but actually, just solved this. It seems PHP CLI and Apache have two different paths. So the module was indeed being loaded for the web, but not on the CLI. –  Aaron B Jul 28 '10 at 17:25

1 Answer 1

Make sure you are editing the correct PHP configuration. The one used by the Apache module can be a different one then the file used by PHP cli. You can use php --ini to see what configuration files are used.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.