Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 18/03/2008, à 21:57

mayaboys

Probléme lors de l'installation de ssh2

Bonjour à tous je voudrais installer ssh2 pour pourvoir lancer des commande unix par php via le ssh. Pour cela voici comment j'ai procéder pour installer ssh2 :

@ J'ai installer openssl et libssl-dev
@ Télécharger libssh2 http://sourceforge.net/projects/libssh2/
@ Décompresse libssh2
@ Commande dans le repertoire ou j'ai decompresser libssh2 ./configure && make all install
@ Installer php5-dev vu que je suis sous php5
@ Télécharger ssh2
@ Décompressé ssh2
@ Commande dans le repertoire ou j'ai decompresser ssh2  phpize && ./configure --with-ssh2 && make
@ Et la normalement la génération du fichier ssh2.so devrait apparaitre dans le fichier module mais il n'y a rien je ne suis pas un expert loin de la il y a une erreur lorsque j'ai exécuté la derniére commande j'ai collé le resultat ci-dessous

Merci de votre aide. Bonne soirée a tous.

root@79:/usr/lib/php5/20060613/ssh2-0.10# phpize && ./configure --with-ssh2 && make
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20060613
checking for PHP installed headers prefix... /usr/include/php5
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for ssh2 support... yes, shared
checking for ssh2 files in default path... found in /usr/local
checking for libssh2_banner_set in -lssh2... yes
checking for libssh2_channel_forward_listen_ex in -lssh2... yes
checking for libssh2_userauth_hostbased_fromfile_ex in -lssh2... yes
checking for libssh2_poll in -lssh2... yes
checking for libssh2_publickey_init in -lssh2... yes
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) 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 libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
/bin/sh /usr/lib/php5/20060613/ssh2-0.10/libtool --mode=compile gcc  -I. -I/usr/lib/php5/20060613/ssh2-0.10 -DPHP_ATOM_INC -I/usr/lib/php5/20060613/ssh2-0.10/include -I/usr/lib/php5/20060613/ssh2-0.10/main -I/usr/lib/php5/20060613/ssh2-0.10 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /usr/lib/php5/20060613/ssh2-0.10/ssh2.c -o ssh2.lo 
mkdir .libs
 gcc -I. -I/usr/lib/php5/20060613/ssh2-0.10 -DPHP_ATOM_INC -I/usr/lib/php5/20060613/ssh2-0.10/include -I/usr/lib/php5/20060613/ssh2-0.10/main -I/usr/lib/php5/20060613/ssh2-0.10 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /usr/lib/php5/20060613/ssh2-0.10/ssh2.c  -fPIC -DPIC -o .libs/ssh2.o
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c: In function 'zif_ssh2_methods_negotiated':
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c:481: warning: passing argument 2 of 'libssh2_session_methods' makes integer from pointer without a cast
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c:481: error: too many arguments to function 'libssh2_session_methods'
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c: In function 'zif_ssh2_fingerprint':
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c: In function 'zif_ssh2_publickey_add':
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c:1038: warning: passing argument 1 of '_efree' discards qualifiers from pointer target type
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c: In function 'zif_ssh2_publickey_list':
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c:1097: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c:1098: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type
/usr/lib/php5/20060613/ssh2-0.10/ssh2.c:1106: warning: initialization discards qualifiers from pointer target type
/usr/lib/php5/20060613/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] Erreur 1

Hors ligne

#2 Le 19/03/2008, à 00:03

gene69

Re : Probléme lors de l'installation de ssh2

pourquoi tu n'installes pas les versions packagées avec openssh et php5-cli?


Quand le berger est lâche, le loup chie de la laine.
A (draft) guide to UFO Alien-Invasion

Hors ligne

#3 Le 19/03/2008, à 11:46

mayaboys

Re : Probléme lors de l'installation de ssh2

C'est a dire les version packagées j'ai deja installer openssh et php5-cli, y aurait t-il un autre moyen de lancer des commande par php qui serer un peu plus simple.

Merci de votre aide

Hors ligne

#4 Le 02/04/2008, à 16:41

Job

Re : Probléme lors de l'installation de ssh2

Bonjour,

J'ai exactement le même problème. As tu réussi à résoudre ton problème?

Hors ligne

#5 Le 02/04/2008, à 17:09

Job

Re : Probléme lors de l'installation de ssh2

Bonjour,

J'ai exactement le même problème. As tu réussi à résoudre ton problème?

Hors ligne

#6 Le 02/04/2008, à 17:12

wblitz

Re : Probléme lors de l'installation de ssh2

C'est a dire les version packagées j'ai deja installer openssh et php5-cli, y aurait t-il un autre moyen de lancer des commande par php qui serer un peu plus simple.

tout dépend de ce que tu veux faire exactement...


"Un optimiste, c'est un homme qui plante deux glands et qui s'achète un hamac" - Jean de Lattre de Tassigny
Pensez à mettre [RÉSOLU] dans le sujet de vos posts une fois qu'ils le sont...
quelques docs

Hors ligne

#7 Le 05/04/2008, à 17:15

jimish

Re : Probléme lors de l'installation de ssh2

Salut,

j'ai trouvé ça : http://www.developpez.net/forums/showthread.php?t=420443

En gros tu fais :
1) phpize && ./configure --with-ssh2
2) Ajoute dans config.h => #define LIBSSH2_APINO 200412301450
3) make

Apres tu devrais avoir ton ssh2.so dans modules

Bonne continuation