PHP和SSH2模块之间的模块API不匹配

我试图安装PHP的ssh2扩展,经过几个小时的工作,我已经搞清楚了。 我认为。

它的编译和ssh2.so是在正确的目录和所有。 我相信问题是版本不匹配。

这是对我而言的错误:

PHP Warning: PHP Startup: ssh2: Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=0 PHP compiled with module API=20060613, debug=0, thread-safety=0 These options need to match in Unknown on line 0 

我几乎处于死胡同。 我怎样才能得到正确的ssh2模块API?

韦尔普,我知道了。 我安装了PEAR,并从那里使用pecl来安装正确的API。

我是国王。

如果通过PEAR安装不是一种select,因为它不适合我,但是在编译apache模块时仍然遇到API不匹配错误,请理解您必须使用正确的phpize:

 phpize-5.3 

如果您安装了多个php版本,那么正确的configuration选项是:

 ./configure --with-php-config=/usr/local/php53/bin/php-config