how to install pecl ssh2 extension on centos6 to access server remotely

Hi
I want to install pecl ssh2 extension for PHP. I tried http://programster.blogspot.com/2013/06/centos-64-install-ssh2-extension-for-php.html

yum install gcc php-devel php-pear libssh2 libssh2-devel make
pecl install -f ssh2

but after running this command, I got error ( -bash: pecl: command not found ).
can someone please guide me how to install that.

I need to install this extension to access my server remotely through web-browser and run some basic commands.

Thanks

2 Replies

Hey there!

Taking a look at the link provided, it looks like someone else may have had the same error. Can you provide us the output you see when you run that first command again?

Also it looks like this Stack Overflow question might help point you in the right direction. Specifically if you are running CentOS 6 you might want to run the following commands:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm;
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm;
yum --enablerepo=remi,remi-php55 install php-pear
pecl install pecl_http

Hope this helps!

Hi
I am not getting any error on first command

yum install gcc php-devel php-pear libssh2 libssh2-devel make

but after running second command

pecl install -f ssh2

I am getting following output and SSH2 extension is not installing

pecl install -f ssh2

warning: pecl/ssh2 requires PHP (version >= 4.0.0, version <= 6.0.0), installed version is 7.0.31 downloading ssh2-0.13.tgz … Starting to download ssh2-0.13.tgz (28,984 bytes) ………done: 28,984 bytes 6 source files, building running: phpize Configuring for: PHP Api Version: 20151012 Zend Module Api No: 20151012 Zend Extension Api No: 320151012 libssh2 prefix? [autodetect] : yes building in /var/tmp/pear-build-rootAbI49F/ssh2-0.13 running: /var/tmp/ssh2/configure --with-php-config=/usr/bin/php-config --with-ssh2 checking for grep that handles long lines and -e… /usr/bin/grep checking for egrep… /usr/bin/grep -E checking for a sed that does not truncate output… /usr/bin/sed checking for cc… cc checking whether the C compiler works… yes checking for C compiler default output file name… a.out checking for suffix of executables… checking whether we are cross compiling… no checking for suffix of object files… o checking whether we are using the GNU C compiler… yes checking whether cc accepts -g… yes checking for cc option to accept ISO C89… none needed checking how to run the C preprocessor… cc -E checking for icc… no checking for suncc… no checking whether cc understands -c and -o together… yes checking for system library directory… lib checking if compiler supports -R… no checking if compiler supports -Wl,-rpath,… yes checking build system type… x8664-unknown-linux-gnu checking host system type… x8664-unknown-linux-gnu checking target system type… x8664-unknown-linux-gnu checking for PHP prefix… /usr checking for PHP includes… -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib checking for PHP extension directory… /usr/lib64/php/modules checking for PHP installed headers prefix… /usr/include/php checking if debug is enabled… no checking if zts is enabled… no checking for re2c… no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk… gawk checking for ssh2 support… yes, shared checking for ssh2 files in default path… found in /usr checking for libssh2sessionhostkey in -lssh2… yes checking for libssh2agentinit in -lssh2… yes checking for libssh2sessionsettimeout in -lssh2… yes checking how to print strings… printf checking for a sed that does not truncate output… (cached) /usr/bin/sed checking for fgrep… /usr/bin/grep -F checking for ld used by cc… /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld… yes checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface… BSD nm checking whether ln -s works… yes checking the maximum length of command line arguments… 1572864 checking whether the shell understands some XSI constructs… yes checking whether the shell understands "+="… yes checking how to convert x8664-unknown-linux-gnu file names to x8664-unknown-linux-gnu format… funcconvertfilenoop checking how to convert x8664-unknown-linux-gnu file names to toolchain format… funcconvertfilenoop checking for /usr/bin/ld option to reload object files… -r checking for objdump… objdump checking how to recognize dependent libraries… passall checking for dlltool… no checking how to associate runtime and link libraries… printf %s\n checking for ar… ar checking for archiver @FILE support… @ checking for strip… strip checking for ranlib… ranlib checking for gawk… (cached) gawk checking command to parse /usr/bin/nm -B output from cc object… ok checking for sysroot… no checking for mt… no checking if : is a manifest tool… no checking for ANSI C header files… yes checking for sys/types.h… yes checking for sys/stat.h… yes checking for stdlib.h… yes checking for string.h… yes checking for memory.h… yes checking for strings.h… yes checking for inttypes.h… yes checking for stdint.h… yes checking for unistd.h… yes checking for dlfcn.h… yes checking for objdir… .libs checking if cc supports -fno-rtti -fno-exceptions… no checking for cc option to produce PIC… -fPIC -DPIC checking if cc PIC flag -fPIC -DPIC works… yes checking if cc static flag -static works… no checking if cc supports -c -o file.o… yes checking if cc supports -c -o file.o… (cached) yes checking whether the cc linker (/usr/bin/ld -m elfx8664) supports shared libraries… yes checking whether -lc should be explicitly linked in… no checking dynamic linker characteristics… GNU/Linux ld.so checking how to hardcode library paths into programs… immediate checking whether stripping libraries is possible… yes checking if libtool supports shared libraries… yes checking whether to build shared libraries… yes checking whether to build static libraries… no configure: creating ./config.status config.status: creating config.h config.status: executing libtool commands running: make /bin/sh /var/tmp/pear-build-rootAbI49F/ssh2-0.13/libtool --mode=compile cc -I. -I/var/tmp/ssh2 -DPHP¨C11CINC -I/var/tmp/pear-build-rootAbI49F/ssh2-0.13/include -I/var/tmp/pear-build-rootAbI49F/ssh2-0.13/main -I/var/tmp/ssh2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE¨C12CH -g -O2 -c /var/tmp/ssh2/ssh2.c -o ssh2.lo libtool: compile: cc -I. -I/var/tmp/ssh2 -DPHP¨C13CINC -I/var/tmp/pear-build-rootAbI49F/ssh2-0.13/include -I/var/tmp/pear-build-rootAbI49F/ssh2-0.13/main -I/var/tmp/ssh2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE¨C14CH -g -O2 -c /var/tmp/ssh2/ssh2.c -fPIC -DPIC -o .libs/ssh2.o In file included from /var/tmp/ssh2/ssh2.c:28:0: /var/tmp/ssh2/php¨C15Cnetwork.h:30:0: note: this is the location of the previous definition # define closesocket close ^ In file included from /var/tmp/ssh2/ssh2.c:28:0: /var/tmp/ssh2/php¨C16Crsrc¨C17Centry' void php¨C18Csftp¨C19Crsrc¨C20Centry ¨C21Cssh2¨C22Ccb': /var/tmp/ssh2/ssh2.c:110:55: error: macro "ZVAL¨C23CSTRINGL(zmessage, (char)message, messagelen, 1); ^ /var/tmp/ssh2/ssh2.c:110:2: error: 'ZVALSTRINGL' undeclared (first use in this function)
ZVALSTRINGL(zmessage, (char)message, messagelen, 1);
^
/var/tmp/ssh2/ssh2.c:110:2: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/ssh2/ssh2.c:114:58: error: macro "ZVALSTRINGL" passed 4 arguments, but takes just 3 ZVALSTRINGL(zlanguage, (char
)language, languagelen, 1); ^ /var/tmp/ssh2/ssh2.c:121:2: warning: passing argument 6 of 'calluserfunctionex' from incompatible pointer type [enabled by default]
if (FAILURE == calluserfunctionex(NULL, NULL, data->disconnectcb, NULL, 3, args, 0, NULL TSRMLSCC)) { ^ In file included from /usr/include/php/main/php.h:39:0, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendAPI.h:473:14: note: expected 'struct zval *' but argument is of type 'struct zval ***'
ZENDAPI int calluserfunctionex(HashTable *functiontable, zval *object, zval *functionname, zval *retvalptr, uint32t paramcount, zval params[], int noseparation, zendarray *symboltable);
^
/var/tmp/ssh2/ssh2.c:124:2: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default] zvalptrdtor(&zdisplay); ^ In file included from /usr/include/php/Zend/zend.h:39:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void _zvalptrdtor(zval *zvalptr ZENDFILELINEDC);
^
/var/tmp/ssh2/ssh2.c:125:2: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default] zvalptrdtor(&zmessage); ^ In file included from /usr/include/php/Zend/zend.h:39:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void _zvalptrdtor(zval *zvalptr ZENDFILELINEDC);
^
/var/tmp/ssh2/ssh2.c:126:2: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default] zvalptrdtor(&zlanguage); ^ In file included from /usr/include/php/Zend/zend.h:39:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void _zvalptrdtor(zval *zvalptr ZENDFILELINEDC);
^
/var/tmp/ssh2/ssh2.c: In function 'phpssh2ignorecb': /var/tmp/ssh2/ssh2.c:149:55: error: macro "ZVALSTRINGL" passed 4 arguments, but takes just 3
ZVALSTRINGL(zmessage, (char)message, messagelen, 1);
^
/var/tmp/ssh2/ssh2.c:149:2: error: 'ZVALSTRINGL' undeclared (first use in this function) ZVALSTRINGL(zmessage, (char
)message, messagelen, 1); ^ /var/tmp/ssh2/ssh2.c:152:2: warning: passing argument 4 of 'calluserfunctionex' from incompatible pointer type [enabled by default]
if (FAILURE == calluserfunctionex(NULL, NULL, data->ignorecb, &zretval, 1, args, 0, NULL TSRMLSCC)) { ^ In file included from /usr/include/php/main/php.h:39:0, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendAPI.h:473:14: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZENDAPI int calluserfunctionex(HashTable *functiontable, zval *object, zval *functionname, zval *retvalptr, uint32t paramcount, zval params[], int noseparation, zendarray *symboltable);
^
/var/tmp/ssh2/ssh2.c:152:2: warning: passing argument 6 of 'calluserfunctionex' from incompatible pointer type [enabled by default] if (FAILURE == calluserfunctionex(NULL, NULL, data->ignorecb, &zretval, 1, args, 0, NULL TSRMLSCC)) {
^
In file included from /usr/include/php/main/php.h:39:0,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendAPI.h:473:14: note: expected 'struct zval *' but argument is of type 'struct zval ***' ZENDAPI int calluserfunctionex(HashTable *functiontable, zval *object, zval *functionname, zval *retvalptr, uint32t paramcount, zval params[], int noseparation, zendarray *symboltable); ^ /var/tmp/ssh2/ssh2.c:155:2: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default]
zvalptrdtor(&zmessage);
^
In file included from /usr/include/php/Zend/zend.h:39:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **' ZENDAPI void zvalptrdtor(zval *zvalptr ZENDFILELINEDC); ^ /var/tmp/ssh2/ssh2.c:157:3: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default]
zvalptrdtor(&zretval);
^
In file included from /usr/include/php/Zend/zend.h:39:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **' ZENDAPI void zvalptrdtor(zval *zvalptr ZENDFILELINEDC); ^ /var/tmp/ssh2/ssh2.c: In function 'phpssh2macerrorcb':
/var/tmp/ssh2/ssh2.c:183:52: error: macro "ZVALSTRINGL" passed 4 arguments, but takes just 3 ZVALSTRINGL(zpacket, (char)packet, packetlen, 1); ^ /var/tmp/ssh2/ssh2.c:183:2: error: 'ZVALSTRINGL' undeclared (first use in this function)
ZVALSTRINGL(zpacket, (char)packet, packet
len, 1);
^
/var/tmp/ssh2/ssh2.c:186:2: warning: passing argument 4 of 'calluserfunctionex' from incompatible pointer type [enabled by default] if (FAILURE == calluserfunctionex(NULL, NULL, data->macerrorcb, &zretval, 1, args, 0, NULL TSRMLSCC)) {
^
In file included from /usr/include/php/main/php.h:39:0,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendAPI.h:473:14: note: expected 'struct zval *' but argument is of type 'struct zval **' ZENDAPI int calluserfunctionex(HashTable *functiontable, zval *object, zval *functionname, zval *retvalptr, uint32t paramcount, zval params[], int noseparation, zendarray *symboltable); ^ /var/tmp/ssh2/ssh2.c:186:2: warning: passing argument 6 of 'calluserfunctionex' from incompatible pointer type [enabled by default]
if (FAILURE == calluserfunctionex(NULL, NULL, data->macerrorcb, &zretval, 1, args, 0, NULL TSRMLSCC)) { ^ In file included from /usr/include/php/main/php.h:39:0, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendAPI.h:473:14: note: expected 'struct zval *' but argument is of type 'struct zval ***'
ZENDAPI int calluserfunctionex(HashTable *functiontable, zval *object, zval *functionname, zval *retvalptr, uint32t paramcount, zval params[], int noseparation, zendarray *symboltable);
^
/var/tmp/ssh2/ssh2.c:191:2: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default] zvalptrdtor(&zpacket); ^ In file included from /usr/include/php/Zend/zend.h:39:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void _zvalptrdtor(zval *zvalptr ZENDFILELINEDC);
^
/var/tmp/ssh2/ssh2.c:193:3: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default] zvalptrdtor(&zretval); ^ In file included from /usr/include/php/Zend/zend.h:39:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void _zvalptrdtor(zval *zvalptr ZENDFILELINEDC);
^
/var/tmp/ssh2/ssh2.c: In function 'phpssh2disconnectcb': /var/tmp/ssh2/ssh2.c:223:55: error: macro "ZVALSTRINGL" passed 4 arguments, but takes just 3
ZVALSTRINGL(zmessage, (char)message, messagelen, 1);
^
/var/tmp/ssh2/ssh2.c:223:2: error: 'ZVALSTRINGL' undeclared (first use in this function) ZVALSTRINGL(zmessage, (char
)message, messagelen, 1); ^ /var/tmp/ssh2/ssh2.c:227:58: error: macro "ZVALSTRINGL" passed 4 arguments, but takes just 3
ZVALSTRINGL(zlanguage, (char*)language, languagelen, 1);
^
/var/tmp/ssh2/ssh2.c:230:2: warning: passing argument 6 of 'calluserfunctionex' from incompatible pointer type [enabled by default] if (FAILURE == calluserfunctionex(NULL, NULL, data->disconnectcb, NULL, 3, args, 0, NULL TSRMLSCC)) {
^
In file included from /usr/include/php/main/php.h:39:0,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendAPI.h:473:14: note: expected 'struct zval *' but argument is of type 'struct zval ***' ZENDAPI int calluserfunctionex(HashTable *functiontable, zval *object, zval *functionname, zval *retvalptr, uint32t paramcount, zval params[], int noseparation, zendarray *symboltable); ^ /var/tmp/ssh2/ssh2.c:233:2: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default]
zvalptrdtor(&zreason);
^
In file included from /usr/include/php/Zend/zend.h:39:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **' ZENDAPI void zvalptrdtor(zval *zvalptr ZENDFILELINEDC); ^ /var/tmp/ssh2/ssh2.c:234:2: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default]
zvalptrdtor(&zmessage);
^
In file included from /usr/include/php/Zend/zend.h:39:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **' ZENDAPI void zvalptrdtor(zval *zvalptr ZENDFILELINEDC); ^ /var/tmp/ssh2/ssh2.c:235:2: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default]
zvalptrdtor(&zlanguage);
^
In file included from /usr/include/php/Zend/zend.h:39:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **' ZENDAPI void zvalptrdtor(zval *zvalptr ZENDFILELINEDC); ^ /var/tmp/ssh2/ssh2.c: In function 'phpssh2setcallback':
/var/tmp/ssh2/ssh2.c:253:2: warning: passing argument 2 of 'zendhashfind' from incompatible pointer type [enabled by default]
if (zendhashfind(ht, callback, callbacklen + 1, (void)&handler) == FAILURE) { ^ In file included from /usr/include/php/Zend/zend.h:36:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendhash.h:154:30: note: expected 'struct zendstring *' but argument is of type 'char *' ZENDAPI zval* ZENDFASTCALL zendhashfind(const HashTable *ht, zendstring *key);
^
/var/tmp/ssh2/ssh2.c:253:2: error: too many arguments to function 'zendhashfind'
if (zendhashfind(ht, callback, callbacklen + 1, (void
)&handler) == FAILURE) { ^ In file included from /usr/include/php/Zend/zend.h:36:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendhash.h:154:30: note: declared here
ZENDAPI zval* ZENDFASTCALL zendhashfind(const HashTable *ht, zendstring *key); ^ /var/tmp/ssh2/ssh2.c:253:71: warning: comparison between pointer and integer [enabled by default] if (zendhashfind(ht, callback, callbacklen + 1, (void**)&handler) == FAILURE) {
^
/var/tmp/ssh2/ssh2.c:269:5: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default] zvalptrdtor(&data->ignorecb);
^
In file included from /usr/include/php/Zend/zend.h:39:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **' ZENDAPI void zvalptrdtor(zval *zvalptr ZENDFILELINEDC); ^ /var/tmp/ssh2/ssh2.c:276:5: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default]
zvalptrdtor(&data->debugcb); ^ In file included from /usr/include/php/Zend/zend.h:39:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void _zvalptrdtor(zval *zvalptr ZENDFILELINEDC);
^
/var/tmp/ssh2/ssh2.c:283:5: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default] zvalptrdtor(&data->macerrorcb);
^
In file included from /usr/include/php/Zend/zend.h:39:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **' ZENDAPI void zvalptrdtor(zval *zvalptr ZENDFILELINEDC); ^ /var/tmp/ssh2/ssh2.c:290:5: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default]
zvalptrdtor(&data->disconnectcb); ^ In file included from /usr/include/php/Zend/zend.h:39:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void _zvalptrdtor(zval *zvalptr ZENDFILELINEDC);
^
/var/tmp/ssh2/ssh2.c:295:4: warning: passing argument 1 of 'zvalptrdtor' from incompatible pointer type [enabled by default] zvalptrdtor(&copyval); ^ In file included from /usr/include/php/Zend/zend.h:39:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendvariables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'
ZEND_API void _zvalptrdtor(zval *zvalptr ZENDFILELINEDC);
^
/var/tmp/ssh2/ssh2.c: In function 'phpssh2setmethod': /var/tmp/ssh2/ssh2.c:312:2: warning: passing argument 2 of 'zendhashfind' from incompatible pointer type [enabled by default] if (zendhashfind(ht, method, methodlen + 1, (void)&value) == FAILURE) { ^ In file included from /usr/include/php/Zend/zend.h:36:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendhash.h:154:30: note: expected 'struct zendstring *' but argument is of type 'char *' ZENDAPI zval* ZENDFASTCALL zendhashfind(const HashTable *ht, zendstring *key); ^ /var/tmp/ssh2/ssh2.c:312:2: error: too many arguments to function 'zendhashfind' if (zendhashfind(ht, method, methodlen + 1, (void)&value) == FAILURE) {
^
In file included from /usr/include/php/Zend/zend.h:36:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendhash.h:154:30: note: declared here ZENDAPI zval* ZENDFASTCALL zendhashfind(const HashTable *ht, zendstring *key);
^
/var/tmp/ssh2/ssh2.c:312:65: warning: comparison between pointer and integer [enabled by default]
if (zendhashfind(ht, method, methodlen + 1, (void)&value) == FAILURE) { ^ /var/tmp/ssh2/ssh2.c:320:2: warning: passing argument 3 of 'libssh2sessionmethodpref' makes pointer from integer without a cast [enabled by default]
return libssh2sessionmethodpref(session, methodtype, ZSTRVALPP(value));
^
In file included from /var/tmp/ssh2/phpssh2.h:24:0, from /var/tmp/ssh2/ssh2.c:28: /usr/include/libssh2.h:495:17: note: expected 'const char *' but argument is of type 'int' LIBSSH2API int libssh2sessionmethodpref(LIBSSH2SESSION *session,
^
/var/tmp/ssh2/ssh2.c: In function 'phpssh2sessionconnect': /var/tmp/ssh2/ssh2.c:338:2: error: too few arguments to function 'phpnetworkconnectsockettohost'
socket = phpnetworkconnectsockettohost(host, port, SOCKSTREAM, 0, &tv, NULL, NULL, NULL, 0 TSRMLSCC); ^ In file included from /usr/include/php/ext/standard/file.h:26:0, from /var/tmp/ssh2/ssh2.c:27: /usr/include/php/main/phpnetwork.h:246:21: note: declared here
PHPAPI phpsockett phpnetworkconnectsockettohost(const char *host, unsigned short port, ^ /var/tmp/ssh2/ssh2.c:374:3: warning: passing argument 2 of 'zendhashfind' from incompatible pointer type [enabled by default] if (zendhashfind(HASHOF(methods), "clienttoserver", sizeof("clienttoserver"), (void
)&container) == SUCCESS &&
^
In file included from /usr/include/php/Zend/zend.h:36:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zendhash.h:154:30: note: expected 'struct zendstring *' but argument is of type 'char ' ZENDAPI zval ZENDFASTCALL zendhashfind(const HashTable *ht, zendstring *key); ^ /var/tmp/ssh2/ssh2.c:374:3: error: too many arguments to function 'zendhashfind' if (zendhashfind(HASHOF(methods), "clienttoserver", sizeof("clienttoserver"), (void)&container) == SUCCESS && ^ In file included from /usr/include/php/Zend/zend.h:36:0, from /usr/include/php/main/php.h:35, from /var/tmp/ssh2/ssh2.c:25: /usr/include/php/Zend/zendhash.h:154:30: note: declared here ZENDAPI zval* ZENDFASTCALL zendhashfind(const HashTable *ht, zendstring *key); ^ /var/tmp/ssh2/ssh2.c:390:3: warning: passing argument 2 of 'zendhashfind' from incompatible pointer type [enabled by default] if (zendhashfind(HASHOF(methods), "servertoclient", sizeof("servertoclient"), (void)&container) == SUCCESS &&
^
In file included from /usr/include/php/Zend/zend.h:36:0,
from /usr/include/php/main/php.h:35,
from /var/tmp/ssh2/ssh2.c:25:
/usr/include/php/Zend/zend
hash.h:154:30: note: expected 'struct zendstring *' but argument is of type 'char *' ZENDAPI zval* ZENDFASTCALL zendhashfind(const HashTable *ht, zendstring *key);
^
……………………………………

In file included from /var/tmp/ssh2/ssh2.c:28:0:
/var/tmp/ssh2/ssh2.c: In function 'zifssh2authagent': /var/tmp/ssh2/phpssh2.h:145:30: error: expected expression before 'LIBSSH2SESSION' ZENDFETCHRESOURCE(session, LIBSSH2SESSION*, &zsession, -1, PHPSSH2SESSIONRESNAME, lessh2session); \
^
/var/tmp/ssh2/ssh2.c:1168:2: note: in expansion of macro 'SSH2FETCHNONAUTHENTICATEDSESSION' SSH2FETCHNONAUTHENTICATEDSESSION(session, zsession);
^
/var/tmp/ssh2/ssh2.c: At top level:
/var/tmp/ssh2/ssh2.c:1234:35: error: unknown type name 'zendrsrclistentry' static void phpssh2sessiondtor(zendrsrclistentry *rsrc TSRMLSDC)
^
/var/tmp/ssh2/ssh2.c:1264:36: error: unknown type name 'zendrsrclistentry' static void phpssh2listenerdtor(zendrsrclistentry *rsrc TSRMLSDC)
^
/var/tmp/ssh2/ssh2.c:1274:39: error: unknown type name 'zendrsrclistentry' static void phpssh2pkeysubsysdtor(zendrsrclistentry *rsrc TSRMLSDC) ^ /var/tmp/ssh2/ssh2.c: In function 'zmstartupssh2': /var/tmp/ssh2/ssh2.c:1288:55: error: 'phpssh2sessiondtor' undeclared (first use in this function)
lessh2session = zendregisterlistdestructorsex(phpssh2sessiondtor, NULL, PHPSSH2SESSIONRESNAME, modulenumber);
^
/var/tmp/ssh2/ssh2.c:1289:55: error: 'phpssh2listenerdtor' undeclared (first use in this function) lessh2listener = zendregisterlistdestructorsex(phpssh2listenerdtor, NULL, PHPSSH2LISTENERRESNAME, modulenumber); ^ /var/tmp/ssh2/ssh2.c:1290:52: error: 'phpssh2sftpdtor' undeclared (first use in this function)
lessh2sftp = zendregisterlistdestructorsex(phpssh2sftpdtor, NULL, PHPSSH2SFTPRESNAME, modulenumber);
^
/var/tmp/ssh2/ssh2.c:1291:58: error: 'phpssh2pkeysubsysdtor' undeclared (first use in this function)
lessh2pkeysubsys = zendregisterlistdestructorsex(phpssh2pkeysubsysdtor, NULL, PHPSSH2PKEYSUBSYSRESNAME, module_number);
^
make: *** [ssh2.lo] Error 1
ERROR: `make' failed

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct