knavegrs Posted January 21, 2009 Share Posted January 21, 2009 ?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"); } ?> ] Quote Link to comment Share on other sites More sharing options...
corbin Posted January 21, 2009 Share Posted January 21, 2009 http://us.php.net/manual/en/ssh2.installation.php According to that, you should be using ssh2.so as there isn't a php_ssh2.so. Perhaps PHP couldn't find it or something? Did you get an error? Quote Link to comment Share on other sites More sharing options...
knavegrs Posted January 21, 2009 Author Share Posted January 21, 2009 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 Quote Link to comment Share on other sites More sharing options...
knavegrs Posted January 23, 2009 Author Share Posted January 23, 2009 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 Quote Link to comment Share on other sites More sharing options...
corbin Posted January 23, 2009 Share Posted January 23, 2009 Looks like you compiled it against a different version of PHP. Quote Link to comment Share on other sites More sharing options...
knavegrs Posted January 24, 2009 Author Share Posted January 24, 2009 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. Quote Link to comment Share on other sites More sharing options...
corbin Posted January 25, 2009 Share Posted January 25, 2009 Hrmmm maybe that version of SSH2 was only compatible with PHP5.2. Strange. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.