Jinbom Heo
Jinbom Heo

Reputation: 7400

php can not load extension

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?

Upvotes: 0

Views: 3817

Answers (2)

Justin T.
Justin T.

Reputation: 3701

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 !

Upvotes: 3

Julian Knight
Julian Knight

Reputation: 4923

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.

Upvotes: 2

Related Questions