Instalarea

Informație despre instalarea acestei extensii PECL poate fi găsită în capitolul manualului, întitulat Instalarea extensiilor PECL. Informații adiționale, cum ar fi lansări noi, descărcări, fișiere-sursă, informații despre persoana care întreține extensia și istoria schimbărilor poate fi localizată aici: » http://pecl.php.net/package/ssh2.

O bibliotecă DLL pentru această extensie PECL nu este disponibilă în prezent. Accesați de asemenea și secțiunea compilarea în Windows.

add a note add a note

User Contributed Notes 5 notes

up
11
zizifu at gmail dot com
1 year ago
CentOS 6.2 64bit Installation Steps:

1. download the libssh2 package from http://libssh2.org, command as following:
tar vxzf libssh2-1.4.2.tar.gz
cd libssh2-1.4.2
./configure
make
make install

2. download the php-ssh2 package from http://pecl.php.net/package/ssh2:

tar vxzf ssh2-0.11.3
cd ssh2-0.11.3
phpize
./configure --with-ssh2
make
make install

and the ssh2.so file will copy into /usr/lib64/php/modules
check it.

3. modify the php.ini

vi /etc/php.ini

add the "extension=ssh2.so" to the extension part of php.ini

4. check the environment of php, use phpinfo();

5. enjoy
up
1
imedina at grosshat dot com
3 years ago
Using PECL it must be specified the channel, since the beta version has to be choosen instead of stable one:

$ pecl install ssh2 channel://pecl.php.net/ssh2-version
up
1
dreadwestern at gmail dot com
1 year ago
Steps for installing the extension package on Debian systems:

> sudo apt-get install libssh2-php
> sudo /etc/init.d/apache2 restart
up
-1
chris at 3menandarecorder dot com
5 years ago
To help someone avoid the headaches I did for a week. SSH2 functions have problems with the ssh2-beta & libssh2-0.18 even after patching with said patches on the internet.

ssh_exec will work fine
ssh2_shell will not work

In order to use ssh2_shell I had to roll back to libssh2-0.14 in order to get ssh2_shell function to work properly
up
-2
arie dot mail at gmail dot com
5 years ago
Just a little note: when compiling this package after modifying the ssh2.c, do not use pecl build as it will not create an ssh2.so file (although it says it succeeded), use:

phpize
./configure --with-ssh2
make

you then need to copy the ssh2.so file into your extension dir if it didn't do so already.
To Top