Control Web Panel

WebPanel => PHP => Topic started by: erm3nda on April 09, 2015, 04:46:12 AM

Title: LibSSH2
Post by: erm3nda on April 09, 2015, 04:46:12 AM
I have problems on install libSSH2.

I've follow some guides here and there and finally comes up to:

Code: [Select]
yum install gcc php-devel php-pear libssh2 libssh2-devel
pecl install -f ssh2
touch /etc/php.d/ssh2.ini
echo extension=ssh2.so > /etc/php.d/ssh2.ini

The pecl install stop was "failed with":
Code: [Select]
Warning: opendir(/tmp/pear/temp/pear-build-rootzlWRuA/install-ssh2-0.12//usr/local): failed to open dir: No such file or directory in /usr/lib64/php/PEAR/Builder.php on line 188
I watch at phpinfo() and the module seems loaded, but didn't recognize the ssh2_connect() comand (
Code: [Select]
Fatal error: Call to undefined function ssh2_connect() in)

The directory /tmp/pear/temp/pear-build-rootzlWRuA/install-ssh2-0.12 is not anymore so i cannot dig for files. I think that must be fixed on the install. If you see carefully, you will see that there's no space on the last paths.

Code: [Select]
Warning: opendir(/tmp/pear/temp/pear-build-rootzlWRuA/install-ssh2-0.12//usr/local)
Actually i don't know how to fix that :(
Title: Re: LibSSH2
Post by: brijendrasial on April 09, 2015, 06:27:11 AM
Quote
http://panel.bullten.net/knowledgebase/39/Intalling-PHP-SSH2-in-cwp.html

Auto Installer:

Quote
http://panel.bullten.net/knowledgebase/40/PHP-SSH2-in-CWP-Auto-Installer.html
Title: Re: LibSSH2
Post by: erm3nda on April 10, 2015, 03:04:49 PM
I've downloaded directly the autoinstallerd and worked like a charm.
Good job and thank you.
Title: Re: LibSSH2
Post by: brijendrasial on April 10, 2015, 06:02:07 PM
Good to know it worked for u :)
Title: Re: LibSSH2
Post by: erm3nda on April 12, 2015, 06:52:35 AM
LibSSH2 is my root bypass.

I need to exec some bash files as root because im not able to do with the normal users. I know this is about how that users has been created (cwp) because those bash don't fail if i exec with a regular user created with useradd.

I've read also about phpseclib, a pure PHP ssh implementation.
Seems more cool than LibSSH2 due to dependencies, but, at the moment i will stay using my new SSH power :D
Title: Re: LibSSH2
Post by: Gogo on November 01, 2015, 02:20:19 PM
How to enable ssh2 functions on th cwp ?

Extension is installed and loaded, but i can't call ssh2 functions from web, everything is fine but cwp block ssh2 function to be called from the web.

Why is blocked and how to enable it?
Title: Re: LibSSH2
Post by: Igor S. on November 03, 2015, 10:10:22 AM
Hi,
Nothing to block any extension.
Check if the module is loaded and does not have any troubles.
Title: Re: LibSSH2
Post by: Gogo on November 03, 2015, 11:53:04 AM
Module is loaded and working, i can use it from terminal, but can't call ssh2 functions from the php. Function ssh2_connect doesn't exist. So thats mean something block ssh2 to be called from the php.

I'll try to recompile module again later.
Title: Re: LibSSH2
Post by: Igor S. on November 03, 2015, 12:16:00 PM
Yes, try. As I said before the CWP does not have any blocks.
Check your php.ini files.