3

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?

2 Answers 2

2

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 
1
  • upvoted for --with-php-config= Commented Sep 28, 2018 at 9:06
1

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

I am king.

3
  • 1
    It's good to be king. Commented Jan 16, 2012 at 1:24
  • That it is, @WesleyDavid. That it is. Commented Jan 16, 2012 at 1:40
  • To help others that are having this issue, once PEAR is installed run: pecl install -f ssh2 Commented May 18, 2016 at 15:55

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.