0

I have...


1.compiled and made ssh2.so.

2.placed the PHP extension (ssh2.so) in the "extension_dir"

3.been editing the correct php.ini file (extension=ssh2.so), the file "Loaded Configuration File" entry listed in the phpinfo() output.

4.restarted apache server.

but, "php -m" prints no ssh2 module.

any idea?

3
  • 1
    Restarting Apache has no effect on 'php -m' and if the module failed loading it would tell you why if you set the display_startup_errors to On Commented Jun 1, 2012 at 12:26
  • What happens with get_loaded_extensions() - does that reveal it? There's also extension_loaded() to test. Finally, you can try loading with dl() at run time? Commented Jun 1, 2012 at 12:36
  • thank you jack, you gave me the point. Commented Jun 5, 2012 at 2:16

2 Answers 2

3

For php -m to show the ssh2 module, you have to edit the CLI php.ini for that.

There are generally TWO php.ini, one for Apache module and the other for the CLI version of PHP.

In Ubuntu, you will edit /etc/php5/cli/php.ini, but YMMV

Oh, and the syntax is very much the same, so a copy-paste should do the job.

Hope this helps !

Sign up to request clarification or add additional context in comments.

Comments

2

It is not php -m that you want to do but rather to create a php file in your web site containing:

<?php
    phpinfo();
?>

Accessing this via Apache will show you what modules are loaded. You may want to configure Apache to secure access to this.

2 Comments

The question says he tried this, and it was good. Just php -m that didn't show.
Doh! Yep, voted up the other answer. Reminder to self: don't answer questions when pushed for time!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.