installation - PHP ssh extension

02
2013-08
  • user726730

    I'm trying to install the ssh extension of PHP following this article.

    My machine is a Linux mpriki 2.6.26-2-686 #1 SMP Mon Jun 21 05:58:44 UTC 2010 i686 GNU/Linux (lenny13 distrubition

    When I type aptitude install libssh2-1-dev libssh2-php everything seems to be OK, but when I run php -m |grep ssh2, the shell doesn't return anything, so I tried to follow the alternative installation.

    First of all, I tried to download it with wget from here: http://surfnet.dl.sourceforge.net/sourceforge/libssh2/libssh2-0.14.tar.gz, but there was no file to download, so I tried another link: http://www.libssh2.org/download/libssh2-0.14.tar.gz

    Then, when I type pecl install -f ssh2 is see the following message:

    root@mpriki:~# pecl install -f ssh2
    WARNING: failed to download pecl.php.net/ssh2 within preferred state "stable", will instead download version 0.11.3, stability "beta"
    downloading ssh2-0.11.3.tgz ...
    Starting to download ssh2-0.11.3.tgz (23,062 bytes)
    ........done: 23,062 bytes
    5 source files, building
    running: phpize
    Configuring for:
    PHP Api Version:         20041225
    Zend Module Api No:      20060613
    Zend Extension Api No:   220060519
     1. libssh2 prefix? : autodetect
    
    1-1, 'all', 'abort', or Enter to continue:
    

    I find this on superuser but when I run aptitude install libssh2-1-dev, it seems the package has been already been installed.

    Edit: I found this link but even though I don't know what to do.

  • Answers
  • masquat
    1-1, 'all', 'abort', or Enter to continue:
    

    Enter a number (between 1 and 1) to install that module from the list; or the word "all" to install all found modules; or "abort" to abort installation.


  • Related Question

    installation - Making MCRYPT working with PHP
  • Konzepz

    I installed the mcrypt library, but for some reason Apache disregards it. The files are in place, reinstalling invokes messages that newest version is already installed.

    Any ideas?


  • Related Answers
  • AaronLS

    Have you tried restarting apache after installing?

    Edit: Yes, that's how I would restart it. Also FYI, after installing the mcrypt extension, you must then recompile php with the --with-mcrypt=/usr/local/bin/mcrypt option, except use the path to where the mcrypt extension is installed.

    There are two individuals in the comments on this page who experienced the same error. Might try their suggestions: http://us3.php.net/manual/en/mcrypt.setup.php

    Also, note the comment here regarding the same error: http://us3.php.net/manual/en/mcrypt.installation.php

  • lhoBas

    Which platform do you use? Are you using a Mac? Installing an Apache module on a Mac can be a tricky process.