Nota
Para compilar a extensão ssh2 para o php é necessário ter o programa phpize, ele está no pacote php-devel*.rpm
Para compilar a extensão ssh2 para o php é necessário ter o programa phpize, ele está no pacote php-devel*.rpm
Ao compilar a extensão ssh2 para o php, um erro ocorre:
gcc -I. -I/usr/src/ssh2-0.10 -DPHP_ATOM_INC -I/usr/src/ssh2-0.10/include -I/usr/src/ssh2-0.10/main -I/usr/src/ssh2-0.10 -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_CONFIG_H -g -O2 -c /usr/src/ssh2-0.10/ssh2.c -fPIC -DPIC -o .libs/ssh2.o /usr/src/ssh2-0.10/ssh2.c: In function 'zif_ssh2_methods_negotiated': /usr/src/ssh2-0.10/ssh2.c:481: warning: passing argument 2 of 'libssh2_session_methods' makes integer from pointer without a cast /usr/src/ssh2-0.10/ssh2.c:481: error: too many arguments to function 'libssh2_session_methods' /usr/src/ssh2-0.10/ssh2.c: In function 'zif_ssh2_fingerprint': /usr/src/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type /usr/src/ssh2-0.10/ssh2.c: In function 'zif_ssh2_publickey_add': /usr/src/ssh2-0.10/ssh2.c:1038: warning: passing argument 1 of '_efree' discards qualifiers from pointer target type /usr/src/ssh2-0.10/ssh2.c: In function 'zif_ssh2_publickey_list': /usr/src/ssh2-0.10/ssh2.c:1097: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type /usr/src/ssh2-0.10/ssh2.c:1098: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type /usr/src/ssh2-0.10/ssh2.c:1106: warning: initialization discards qualifiers from pointer target type /usr/src/ssh2-0.10/ssh2.c:1107: warning: passing argument 2 of '_zend_hash_add_or_update' discards qualifiers from pointer target type make: *** [ssh2.lo] Error 1
Pra resolver isso, editar o arquivo config.h e acrescentar:
#define LIBSSH2_APINO 200412301450

Join the conversation