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.

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?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Welp, I've figured it out. I installed PEAR, and from there used pecl to install it for the correct API.

I am king.

share|improve this answer
1  
It's good to be king. –  Wesley Jan 16 '12 at 1:24
    
That it is, @WesleyDavid. That it is. –  Rob Jan 16 '12 at 1:40
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.