Problem Installing SSH2

#1
Hello
I want to install ssh2
I use php 5.3.x, lsws (latest), cpanel (latest)
I was installed it and I can see
ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp in Registered PHP Streams part of phpinfo()

But there is not any section like this :



I was installed ssh2 & libssh2 on another apache server and it work well
Current error for lsws server is :
Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to x.x.x.x on port 22 in /home/user/public_html/ssh.php on line 5
port 22 is open!
 

Attachments

#3
I was compiled libssh2
Then :
1. cd ssh2-0.12
2. make clean
3. /usr/local/lsws/lsphp5/bin/phpize
4. ./configure --with-php-config=/usr/local/lsws/lsphp5/bin/php-config
5. make
6. make install
7. service lsws restart
ssh2.so was added to php.ini automatically (same php.ini located in phpinfo)

Final Result:
Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to x.x.x.x on port 22 in /home/user/public_html/ssh.php on line 5
 

NiteWave

Administrator
#7
Sorry for late, succeeded to build ssh2 on lsphp-5.3.27 without surprise.

I built it in a x86 box. the steps just FYI:
#yum install libssh2-devel.i386
#yum install openssl-devel.i386

following steps same as you:
1. cd ssh2-0.12
2. make clean
3. /usr/local/lsws/lsphp5/bin/phpize
4. ./configure --with-php-config=/usr/local/lsws/lsphp5/bin/php-config
5. make
6. make install
7. service lsws restart
only in step 4, I added --with-ssh2
./configure --with-ssh2 --with-php-config=/usr/local/lsws/lsphp5/bin/php-config
however, it may not have any difference

step
6.5 add
extension=ssh2.so
to php.ini

when access phpinfo page, the ssh2 section is there:
extension version 0.12
libssh2 version 1.2.9
banner SSH-2.0-libssh2_1.2.9
 
Top