Skip to main content

PHP extension ssh2 on internal cpanel php

Comments

9 comments

  • cPanelKenneth
    According to the documentation (
    0
  • speckados
    Well. I know this. But I don't know how to install on cpanel php ssh2
    # /usr/local/cpanel/3rdparty/bin/php -i |grep ssh CVS_RSH => ssh _SERVER["CVS_RSH"> => ssh _ENV["CVS_RSH"> => ssh # php -i |grep ssh Registered PHP Streams => compress.zlib, compress.bzip2, dict, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp, php, file, glob, data, zip, phar, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp ssh2 libssh2 version => 1.4.4-20150125 banner => SSH-2.0-libssh2_1.4.4-20150125 CVS_RSH => ssh _SERVER["CVS_RSH"> => ssh _ENV["CVS_RSH"> => ssh
    0
  • JacobPerkins
    Hi, As Ken suggested, you'll need to use the binary located at '/usr/local/cpanel/3rdparty/bin/pecl' to install this to cPanels internal PHP
    0
  • speckados
    Error...
    /usr/local/cpanel/3rdparty/bin/pecl install channel://pecl.php.net/ssh2-0.12 downloading ssh2-0.12.tgz ... Starting to download ssh2-0.12.tgz (26,223 bytes) .........done: 26,223 bytes 6 source files, building running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 /usr/local/cpanel/3rdparty/php/54/bin/phpize: /tmp/pear/temp/ssh2/build/shtool: /bin/sh: bad interpreter: Permiso denegado Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: `phpize' failed
    Also
    /usr/local/cpanel/3rdparty/bin/pecl install ssh2 Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install install failed
    Also
    /usr/local/cpanel/3rdparty/bin/pecl install ssh2-beta downloading ssh2-0.12.tgz ... Starting to download ssh2-0.12.tgz (26,223 bytes) .........done: 26,223 bytes 6 source files, building running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 /usr/local/cpanel/3rdparty/php/54/bin/phpize: /tmp/pear/temp/ssh2/build/shtool: /bin/sh: bad interpreter: Permiso denegado Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: `phpize' failed
    0
  • JacobPerkins
    Hi, Does /bin/sh have bad permissions? It says 'Permission denied' when it tries to execute that script. I was able to install this without any issues.
    Build process completed successfully Installing '/usr/local/cpanel/3rdparty/php/54/lib/extensions/no-debug-non-zts-20100525/ssh2.so' install ok: channel://pecl.php.net/ssh2-0.12 configuration option "php_ini" is not set to php.ini location You should add "extension=ssh2.so" to php.ini
    0
  • speckados

    /bin/sh: bad interpreter: Permiso denegado

    [~]# ls -lisa /bin/sh 5790148 0 lrwxrwxrwx 1 root root 4 sep 30 2014 /bin/sh -> bash* [~]# ls -lisa /bin/bash 5790054 756 -rwxr-xr-x 1 root root 768952 sep 26 2014 /bin/bash*
    This indicates that the error is not in the file permissions. It could be an error in the file is called, but when I write this post is to encourage someone Cpanel team sees it and can bring light, not to make me the research. But for that matter, I had to investigate. As it is not a sh porblema, there was only the execution path /tmp Above not problem... /tmp correct permissions
    [~]#cat /etc/fstab| grep tmp LABEL=/tmp /tmp ext4 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 /tmp /var/tmp ext3 defaults,bind,noauto 0 0 tmpfs /var/mysqltmp tmpfs rw,gid=101,uid=100,size=512M,nr_inodes=10k,mode=0700 0 0
    Above problem... noexec on mounted /tmp
    [~]#cat /etc/mtab| grep tmp /tmp /var/tmp none rw,noexec,nosuid,bind 0 0
    I don't like expend more time, and workround with create a symbolic link to /root/pear on /tmp/pear. Apreciate your time.
    0
  • cPanelMichael
    Hello :) If I am understanding correctly, you were able to address the issue by adjusting the mount options on your /tmp partition. Is that correct? Thank you.
    0
  • speckados
    Thanks @bluehaste I know project phpseclib but for requiremnt of customer needs use libssh2...
    0
  • cPanelMichael
    Thanks @bluehaste I know project phpseclib but for requiremnt of customer needs use libssh2...

    Could you verify if any current issues still exist? I'm unsure if your earlier response indicated a resolution of the problem. Thank you.
    0

Please sign in to leave a comment.