Jump to content

Recommended Posts

?Is there a php_ssh2.so file made somewhere along this road?

  I can't find it.

 

I did the following using the latest versions from sourceforge.net:

  cd /usr/src

  downloaded libssh2-1.0.tar.gz

  tar -zxvf libssh2-1.0.tar.gx

  cd libssh2-1.0

  ./configure

  make all installed

  pecl install -f ssh2

  moved the libssh2.so.1.0.0 to my /usr/lib64 folder

  created links libssh2.so and libssh2.so.1 to libssh2.so.1.0.0

  moved the ssh2.so /usr/lib64/php/modules (to match path in php.ini)

  added extension=ssh2.so to the php.ini folder.

 

test.php still fails

info.php does not show any php_ssh2 section

[so far this is the same as above work by others]

 

Then I went to make the changes to ssh2.c and found that it was not there.

Found it in - ssh2-0.11.0.tgz - so did the following

  cd /usr/src

  downloaded ssh2-0.11.0.tgz

  tar -zxvf ssh2-0.11.0.tgz

  cd ssh2-0.11.0

  Checked for the recommended changes and found that ssh2-0.11.0 had all of them.

  phpize

  ./configure

  make

 

This created /usr/src/ssh2-0.11.0/modules/ssh2.so

I was expecting a php_ssh2.so module to be created -

Moved this to ssh2.so /usr/lib64/php/modules (to match path in php.ini)

test.php still fails

info.php does not show any php_ssh2 section

 

I am running on RHEL 5 with PHP 5.1.6

 

[note: service sshd restart and service httpd restart done before each test]

[test.php is just -

<?php

if (!function_exists("ssh2_connect"))

{

die("function ssh2_connect doesn't exist");

} else {

die("SSH2 Extension Installed");

}

?>

]

 

 

I was begining to believe that was the case

But some of the docs I have been reading talk

About it.

 

Where can I look to see what .so's have loaded?

Or what errors have occured during load?

 

Should you see entry in info.php results for ssh2?

If you have ssh2 working take a look and let me know

 

Thanks

Just found that I am getting an error in my php_error.log file when the ssh2.so is being loaded.

Now I have compiled this on the same system as the PHP - what is going on here.

My php ver is 5.1.6 - do I have some lib incompatibilities - if so how do I get around this???

 

[22-Jan-2009 17:23:27] PHP Warning:  PHP Startup: ssh2: Unable to initialize module

Module compiled with module API=20060613, debug=0, thread-safety=0

PHP    compiled with module API=20050922, debug=0, thread-safety=0

These options need to match

in Unknown on line 0

 

Yes - it looks like that to me too.  But I did compile the libssh2 and ssh2 on the same system.

 

Solved this by upgrading my PHP 5.1.6 to PHP 5.2.6 by using  -

Here is how I did that - since RHEL does not come with the updated versions of PHP and the libssh2.so and ssh2.so are not supported by them, sorry for venting a little, I downloaded source and compiled but got to many errors. Found http://www.jasonlitka.com/yum-repository/ that had the correct upgrades already compiled for RHEL 5.0 x64 - Thank You Jason Litka - after setting up for usage of yum repository I did "yum update php" - all went in without any errors.

 

Just to be sure of clean-ness I rebooted the server and .  .  .

                info.php now shows SSH2 with my compiled (not re-compiled) libssh2 and ssh2 versions in it.

                Every thing I needed is now working.

 

I will now try and recompile the php 5.2.6, libssh2 and ssh2 and see if I can do all the steps involved without errors. 

 

Just to learning how this is all done these days - you see I have not used linux before, I have been doing the other system *MS" for 20 years. Yes I am a convert. I did learn UNIX in 1977 and worked in/on it for 6 years after.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.