Php – Module API mismatch between PHP and SSH2 module

PHP

I'm trying to install the ssh2 extension for PHP, and after hours of working on it, I've near figured it out. I think.

It's compiled and the ssh2.so is in the correct directory and all. The problem, I believe, is version mismatches.

Here's the error it's spouting for me:

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

I'm pretty much at a dead end. How can I get the correct ssh2 module API?

Best Answer

If installing via PEAR is not an option, as it was not for me, but you still are suffering the API Mismatch errors when you are compiling apache modules, understand that you must use the correct phpize:

phpize-5.3

And the correct configure option if you have more than one php version installed:

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