OVH Community, votre nouvel espace communautaire.

[How To] Installer la libssh2 pour php


guillaumec59
22/03/2012, 08h27
Bon j'ai trouvé comment fixer le pb, avec
Code:
ln -sf /usr/portage/profiles/default/linux/x86/10.0/ /etc/make.profile
mais arrivé à
Code:
cp modules/ssh2.so /usr/lib/php5/20090626
ca me retourne
Code:
cp: ne peut ?valuer `modules/ssh2.so': Aucun fichier ou r?pertoire de ce type
why ?

guillaumec59
22/03/2012, 08h13
pffff ca en deviens chiant, voila ce que cela me renvoi

Code:
ns209712 ~ # emerge update
*La commande emerge a ete desactivee
*Vous pouvez cependant l'utiliser au risque de casser le systeme
*Et de ne plus pouvoir installer les patchs fournis par OVH
*
*The emerge command has been disabled
*You could always use it, but the system can be dammaged
*And the patch provide by OVH could be not installed

Continuer / Continue ? (y/n) [ n ] y

!!! ARCH is not set... Are you missing the '/etc/make.profile' symlink?
!!! Is the symlink correct? Is your portage tree complete?

ns209712 ~ #
en remplacant apt-get par emerge ....

CenT
21/03/2012, 18h58
il n'y as pas de apt sous gentoo, pour installer des paquet faut utiliser "emerge" il me semble...

guillaumec59
21/03/2012, 18h35
Salut
Merci pour le pdf, mais rien qu'au apt-get ça foire "not found" ovh désactive ça aussi en gentoo R2 ?

CenT
21/03/2012, 17h39
salut je te passe un tuto sous format PDF que j'ai mis à jour que je me serre pour l'installation de la dernière version de la libssh2 pour Debian Squeeze ou lenny. Si jamais sa peut te servir ^^

Installation libss2 testé sous Debian Lenny - Squeeze

guillaumec59
21/03/2012, 17h14
Pour ma part arrivé à
Code PHP:
cp /usr/local/php5/bin/phpize /ssh2-0.10/phpize
chmod 755 
-/ssh2-0.10
./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make 
mon terminal me renvoi (a la fin)
Code PHP:
checking for gawk... gawk
checking 
for ssh2 support... yesshared
checking 
for ssh2 files in default path... not found
configure
errorThe required libssh2 library was not found.  You can obtain that package from http://sourceforge.net/projects/libssh2/ 
Du coup, il trouve pas le .so

jyraphe
08/10/2009, 11h31
Bonjour, j'ai installé la libssh2 et ssh2, tout va bien sauf que je n'ai pas les même version...

ssh2 est en 0.18 et la libssh2 en 0.14.

Je suis sous Lenny, pourriez vous m'aider à nettoyer correctement libssh2 pour le passer en 0.18 svp ? je galère un peu

merci

arowan
13/08/2009, 11h12
J'ai installé et testé elle fonctionne nikel

extension version--------------0.11.0-dev
libssh2 version-----------------1.1
banner------------------------SSH-2.0-libssh2_1.1
remote forwarding-------------enabled
hostbased auth----------------enabled
polling support-----------------enabled
publickey subsystem-----------enabled
R2 64Bits

Patouf
09/05/2009, 01h39
De même pour SSH2, c'est la V1.1

http://sourceforge.net/project/showf...kage_id=276841

quelqu'un a déjà testé ces dernières versions ?

Patouf
09/05/2009, 01h26
http://sourceforge.net/project/showf...kage_id=137666

22/06/2006 => date de sortie de libssh 0.14

02/04/2009 => date de sortie de la 1.1

pourquoi ne pas mettre à jour les tutos avec la dernière version ? :-D

(à moins qu'elle ne soit buggued comme la 0.18)

naeh
08/05/2009, 18h11
Pour ceux que ça intéresse j'ai fait la même chose mais pour DEBIAN

c'est ici : http://naeh.net/installer-libssh2-ssh2-pour-php/

j'espere que ça aidera


Edit: oups j'avais pas vu qu'il y avait 7 pages, j'ai posté directement a partir de la première page, mille excuses...

Patouf
20/04/2009, 03h31
http://gentoo-portage.com/net-libs/libssh2

=> il me semble qu'une version 1.1 de la libssh2 soit dispo.

c'est le cas ? parce que ici on parle de 0.14 et 0.18, mais si ya moyen d'avoir plus recent, je veux bien :-D

merci d'avance

Patouf
05/03/2009, 15h36
okay je tente ça =)

The Destroyeur
05/03/2009, 11h39
Pour redescendre à la version 0.14:

emerge -C libssh2
emerge /usr/portage/net-libs/libssh2/libssh2-0.14.ebuild
Have fun

Patouf
04/03/2009, 15h35
je vais tenter ça =)

arowan
03/03/2009, 20h15
essaye de compilier la 0.14 et de remplacer les fichier ssh2.la et ssh2.so

http://forum.ovh.com/showpost.php?p=207880&postcount=47

Patouf
03/03/2009, 01h29
up =)

Patouf
01/03/2009, 20h07
c'est chiant ça ....

quelqu'un sait comment redescendre à la version 0.14 ?

arowan
01/03/2009, 17h53
Citation Envoyé par Patouf
ah, ça je savais pas ....

moi qui est installé cette version, c'est sûr à 100% que ça ne fonctionnera pas ?

si oui, comment redescendre à la version d'en dessous ^^
moi avec la 0.18 j'ai déjà eu des bug de connexion contrairement avec la 0.14 qui ne bug pas du tout ^^

Patouf
01/03/2009, 14h10
ah, ça je savais pas ....

moi qui est installé cette version, c'est sûr à 100% que ça ne fonctionnera pas ?

si oui, comment redescendre à la version d'en dessous ^^

arowan
01/03/2009, 00h08
oui mais la 0.18 a des bugs de communication avec avec ssh2

Patouf
28/02/2009, 23h11
hello all !

bon comme tout le monde galère (dont moi, lol), voici la marche à suivre pour installer cette *$^ù¨£µ% de librairie.

Avant cette étape :
./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make
vérifiez que vous êtes dans le bon dossier :
cd /ssh2-0.10
éditez le fichier ssh2.c :
nano ssh2.c
remplacez
#if LIBSSH2_APINO < 200412301450
par
#if LIBSSH2_VERSION_NUM < 0x001000
fermer l'édition.

éditez config.h :
nano config.h
ajoutez en haut du fichier
#define LIBSSH2_APINO 200412301450
fermez l'édition.

reprenez le tutoriel avec :
./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2

normalement ça devrait être bon pour tout le monde, lib 0.18 comprise.

R@v@
25/08/2008, 20h10
up ...

R@v@
24/08/2008, 17h10
Bonjour


Apres install du panel v0.9 puisque la v 2.1 ne marche pas ? ( chez moi du moins )

j'ai tout qui fonctionne sauf le start, stop, restart !

Edith config: server.cfg s'affiche = ok

editer start-xxx: s'affiche = ok

info serveur apres refresh: s'affiche = ok

ensuite ...

Dans Putty:

serv013@nsxxxxx ~ $ ./start-gg4 start
Server is allready started : [ !! ]


Sauf que le serveur ne demarre pas !!

Apres avoir refait un autre start dans le panel toujours rien !

Qui peu m'aider ^^

merci

redji
18/08/2008, 17h38
Code:
emerge /usr/portage/net-libs/libssh2/libssh2-0.14.ebuild
Code:
emerge -s libssh2
Code:
cd /ssh2-0.10
Code:
cp /usr/local/php5/bin/phpize phpize
Code:
./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make
Code:
cp modules/ssh2.so /usr/local/lib/php5/ssh2.so
Code:
cp modules/ssh2.la /usr/local/lib/php5/ssh2.la
Code:
echo "extension_dir = /usr/local/lib/php5" >> /usr/local/lib/php5/php.ini
Code:
echo "extension=ssh2.so" >> /usr/local/lib/php5/php.ini
Code:
cat /usr/local/lib/php5/php.ini
Code:
ls /usr/local/lib/php5/
apres tu relance apache

Sleeck
17/08/2008, 19h45
Citation Envoyé par Hiwyx
Bonjour,
J'ai suivi le tuto mais j'ai un soucis au moment de la compilation de ssh2
Ma version de libssh2 installée est la 0.18 (la dernière)
Lorsque j'exécute la commande
Code:
./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make
J'ai une erreur.
Code:
/home/hiwyx/ssh2-0.10/ssh2.c: In function `zif_ssh2_methods_negotiated':
/home/hiwyx/ssh2-0.10/ssh2.c:481: warning: passing arg 2 of `libssh2_session_methods' makes integer from pointer without a cast
/home/hiwyx/ssh2-0.10/ssh2.c:481: error: too many arguments to function `libssh2_session_methods'
/home/hiwyx/ssh2-0.10/ssh2.c: In function `zif_ssh2_fingerprint':
/home/hiwyx/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c: In function `zif_ssh2_publickey_add':
/home/hiwyx/ssh2-0.10/ssh2.c:1038: warning: passing arg 1 of `_efree' discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c: In function `zif_ssh2_publickey_list':
/home/hiwyx/ssh2-0.10/ssh2.c:1097: warning: passing arg 4 of `add_assoc_stringl_ex' discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c:1098: warning: passing arg 4 of `add_assoc_stringl_ex' discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c:1106: warning: initialization discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c:1107: warning: passing arg 2 of `_zend_hash_add_or_update' discards qualifiers from pointer target type
make: *** [ssh2.lo] Erreur 1
Une idée ?
A la limite je peux installer la version 0.14 de libssh2 mais pas sûr que ça aide vraiment.
Je suis sous la release 2 de ovh
Salut.

J'ai eu le même problème que toi, et j'ai fais un truc tout bete.

Tu ouvre le fichier config.h
Tu ajoute la ligne:

#define LIBSSH2_APINO 200412301450

et tu fais ton make.

foxyfox
13/08/2008, 20h15
Citation Envoyé par arowan
Rédji moi j'ai la solution met toi sur msn

Sympa.
Et quelle est cette solution?

redji
13/08/2008, 20h13
merci arowan sa marche nickel ^^

Geoffroy
10/08/2008, 21h11
checking for ssh2 files in default path... not found
Il lui manque le bon path ; configure est là pour ça.

arowan
10/08/2008, 21h00
Rédji moi j'ai la solution met toi sur msn

redji
10/08/2008, 17h02
up personne pour aider car c un peut la galere merci d avance

arowan
06/08/2008, 22h05
j'ai voulu essaye d'installer la libssh2 sur un de mes serveurs en R2
mais veut pas sniff

au moment de la compilé sa marche pu
./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make
rxxxxx ssh2-0.10 # ./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking how to run the C preprocessor... cc -E
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -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 host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr/local/php5
checking for PHP includes... -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /usr/local/php5/include/php
checking for re2c... re2c
checking for re2c version... 0.12.0 (ok)
checking for gawk... gawk
checking for ssh2 support... yes, shared
checking for ssh2 files in default path... not found
configure: error: The required libssh2 library was not found. You can obtain that package from http://sourceforge.net/projects/libssh2/
que faire ???

redji
05/08/2008, 19h31
voila j ai du reinstaller ma machine qui est sous gentoo R2 le probleme avec les patch plus moyen d installé libssh2 et ssh2

si quelqu un a reussi et qu il peut donné la soluce sa serait sympa merci d avance

Tumtum
10/05/2008, 07h58
Bonjour,

J'avais suivi ton how-to et ça fonctionnait parfaitement, j'ai fait la grosse erreur de mettre à jour PHP à la version 5.2.6 et maintenant libssh2 ne fonctionne plus :
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ssh2.so' - /usr/lib/php/modules/ssh2.so: undefined symbol: _zval_dtor in Unknown on line 0
J'ai recompiler libssh2-0.14 et ssh2-0.10 et j'ai toujours la même erreur...

Est-ce que quelqu'un peu m'aider svp, j'ai vraiment besoin de libssh2.

Merci d'avance pour vos réponses.

A+++++

Hiwyx
26/04/2008, 15h43
Bon ben c'était bien ça, bien bizarre quand même que les nouvelles versions ne fonctionnent pas.
Donc avec la 0.14 ça marche parfaitement, problème résolu

Hiwyx
24/04/2008, 16h38
Bonjour,
J'ai suivi le tuto mais j'ai un soucis au moment de la compilation de ssh2
Ma version de libssh2 installée est la 0.18 (la dernière)
Lorsque j'exécute la commande
Code:
./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make
J'ai une erreur.
Code:
/home/hiwyx/ssh2-0.10/ssh2.c: In function `zif_ssh2_methods_negotiated':
/home/hiwyx/ssh2-0.10/ssh2.c:481: warning: passing arg 2 of `libssh2_session_methods' makes integer from pointer without a cast
/home/hiwyx/ssh2-0.10/ssh2.c:481: error: too many arguments to function `libssh2_session_methods'
/home/hiwyx/ssh2-0.10/ssh2.c: In function `zif_ssh2_fingerprint':
/home/hiwyx/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c: In function `zif_ssh2_publickey_add':
/home/hiwyx/ssh2-0.10/ssh2.c:1038: warning: passing arg 1 of `_efree' discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c: In function `zif_ssh2_publickey_list':
/home/hiwyx/ssh2-0.10/ssh2.c:1097: warning: passing arg 4 of `add_assoc_stringl_ex' discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c:1098: warning: passing arg 4 of `add_assoc_stringl_ex' discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c:1106: warning: initialization discards qualifiers from pointer target type
/home/hiwyx/ssh2-0.10/ssh2.c:1107: warning: passing arg 2 of `_zend_hash_add_or_update' discards qualifiers from pointer target type
make: *** [ssh2.lo] Erreur 1
Une idée ?
A la limite je peux installer la version 0.14 de libssh2 mais pas sûr que ça aide vraiment.
Je suis sous la release 2 de ovh

arowan
19/01/2008, 14h48
C'est bon j'ai trouvé l'erreur maintenant sa marche ^^ j'avais mal compilé

foxyfox
14/01/2008, 22h01
un phpinfo donne koi, poste nous ton php.ini

arowan
14/01/2008, 21h28
Bin moi je suis en ovh R2 aussi j'ai suivi tout le tuto à la lettre (pas une seule erreur) et au moment du grand test j'ai sa

Fatal error: Call to undefined function: ssh2_connect() in /home/callod4/sd/panel/www/tdm/index.php on line 7

Je comprend pas la je sèche totalement

Si quelqu'un pourrait m'aider

arowan02@hotmail.com

Merci

redji
16/12/2007, 22h08
j ai un petit souci pour installer libssh2

ksXXXXX ssh2-0.10 # ./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20050922
Zend Extension Api No: 220051025
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... /usr/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... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr/local/php5
checking for PHP includes... -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext
checking for PHP extension directory... /usr/local/php5/lib/php/extensions/no-debug-non-zts-20050922
checking for PHP installed headers prefix... /usr/local/php5/include/php
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... gawk
checking for ssh2 support... yes, shared
checking for ssh2 files in default path... not found
configure: error: The required libssh2 library was not found. You can obtain that package from http://sourceforge.net/projects/libssh2/
ksXXXXX ssh2-0.10 # cp /ssh2-0.10/modules/ssh2.so /usr/local/lib/php5/ssh2.so
cp: ne peut évaluer `/ssh2-0.10/modules/ssh2.so': Aucun fichier ou répertoire de ce type
la galere je n arrive pas a avoir le repertoires modules

Mawashigeri
17/08/2007, 20h21
Bonjour à tous,

Flux, j'ai également un serveur fedora core 4 et je serais vraiment intéréssé à savoir comment tu as fait pour installer la libssh2 sur ton serveur ovh fedora core 4.
Pourrais-tu m'expliquer les étapes stp ?

Ou quelqu'un l'ayant fait pourrait-il me l'expliquer svp ?

Merci d'avance

Ps: je suis noob en serveur

Citation Envoyé par flux
hé hé...
J' ai un problème tout à fait similaire et purement incompréhensible !
ze m'explique :
J a'i qq serveurs chez OVH dont un seul en PHP5 avec libssh: (FC4) ( celui ou je bricole mon libssh2 via php)

J ai une dédibox (FC4) et j'ai qq serveurs chez 1&1 (Suse 9.3) (De)

ben, je me connecte sans problème via libssh2 vers tout les serveurs OVH et dedibox (tous en FC4) ..
mais dés que j'essaie de me connecter sur mes serveurs 1&1 : j ai le droit à un joli :
Warning ; ssh2_auth_password() [function.ssh2-auth-password]: Authentication failed for root using password

Alors, je comprend plus rien.. histoire de protocole, de version ??

Ne serait ce pas ton soucie The destroyeur ? ...
Simple changement de version libssh ?? ...

@ plus ...

The Destroyeur
24/07/2007, 19h02
Tu dois avoir sa : PasswordAuthentication yes, dans le sshd_config ...

flux
24/07/2007, 12h43
Ben , en fait j ai bien la version 0.14 qui marche impec de Fedora à Fedora ...

Quand à la config SSH, (ssh_config) elle à l' air nickel aussi, bien que je ne vois pas exactement ce qu'il y a modifier !

# ssh_config(5) man page.

# Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
Host *
GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
ForwardX11Trusted yes





Est ce tu as essayé de te connecter sur des serveurs à distrib différentes ? (du coup avec une version OpenSSL peut etre différente) ?

c 'est complètement dingue cette histoire moi je dis ...

flux
24/07/2007, 11h09
ok ..... je vais me pencher plus sur la config

Mercii ... merciii ..

The Destroyeur
24/07/2007, 11h03
La version 0.15 ne marche pas, elle plante totalement, installe la version 0.14, elle marche très bien !

Et n'oublie pas de changer la configuration du serveur SSH comme décrit au dessus

flux
24/07/2007, 00h59
hé hé...
J' ai un problème tout à fait similaire et purement incompréhensible !
ze m'explique :
J a'i qq serveurs chez OVH dont un seul en PHP5 avec libssh: (FC4) ( celui ou je bricole mon libssh2 via php)

J ai une dédibox (FC4) et j'ai qq serveurs chez 1&1 (Suse 9.3) (De)

ben, je me connecte sans problème via libssh2 vers tout les serveurs OVH et dedibox (tous en FC4) ..
mais dés que j'essaie de me connecter sur mes serveurs 1&1 : j ai le droit à un joli :
Warning ; ssh2_auth_password() [function.ssh2-auth-password]: Authentication failed for root using password

Alors, je comprend plus rien.. histoire de protocole, de version ??

Ne serait ce pas ton soucie The destroyeur ? ...
Simple changement de version libssh ?? ...

@ plus ...

The Destroyeur
13/07/2007, 14h34
Attention, la libssh2 0.15 plante totalement !!!

Commande pour installé la libssh2 0.14 :

emerge /usr/portage/net-libs/libssh2/libssh2-0.14.ebuild

The Destroyeur
01/07/2007, 13h46
J'ai fait les mêmes en pascal mais bon

C'est une big calculette qui fait tout et c'est super différent du perl je crois ...

Et puis on est pas à l'école ici

ordi++
01/07/2007, 01h14
Bonjour à tous je dois écrire des scripts simples en peu de lignes envrion 10-15 lignes max. Moi j'arrive à les faire en 80-90 lignes et c'est trop J'ai tout essayer et je n'y arrive pas. Je vous donne les énoncés merci de votre précieuse aide:

1-écrire un programme Perl qui prend sur la ligne de commande une expression mathématique simple (23+8 par exemple) et qui l’évalue avant d’afficher le résultat. L’expression aura toujours deux opérandes et un opérateur. Il peut y avoir des espaces entre les opérandes et l’opérateur ou non (selon ce que voudra bien taper l’utilisateur). Les opérations permises sont l’addition, la soustraction, la multiplication et la division. Il faudra valider l’expression avec une expression rationnelle.


2-écrire un programme auquel on donnera un répertoire en argument (sur la ligne de commande) et qui, dans ce répertoire, devra créer un répertoire pour chaque fichier qui s’y trouve, et déplacer ce fichier dans ce nouveau répertoire. Le nom de chacun des répertoires sera le nom du fichier correspondant (sans l’extension). Si jamais plusieurs fichiers portaient le même nom (avec des extensions différentes), alors ces fichiers se retrouveraient dans le même répertoire. Les fichiers dont le nom commence par un point seront ignorés.


Je vous remercie infiniment de m'aider

The Destroyeur
30/06/2007, 11h10
C'est normal, tu as installé la lib sur ton serveur ! Elle est pas installé partout ...

Julia41
30/06/2007, 07h56
Citation Envoyé par The Destroyeur
Sa marche ché moi donc
http://www.chezmoicamarche.com/

Merde pas chez moi

cejimagie
26/06/2007, 23h58
Quand j'essaye le script sur mon site heberger sur le serveur ca marche impec ..
mais des que je le place sur mon site qui lui est en dehors toujours mm erreur donc est ce que cela peut venir d'une manip à faire sur le client ?

The Destroyeur
26/06/2007, 23h25
Vraiment bizarre ...

Voici un script php utilisant la libssh2:
Code PHP:
$ip='';
$id='root';
$pw='****';
$con=ssh2_connect($ip22); 
ssh2_auth_password($con$id$pw); 
$shell=ssh2_shell($con'linux'); 
usleep(50000);
fwrite($shell"echo \"je suis une fougère\"\n");
sleep(1);
$ligne true;
while(
$ligne) {
    
$ligne fgets($shell);
    echo 
"
$ligne
"
;
}
fclose($shell);
?>
Sa marche ché moi donc

cejimagie
26/06/2007, 22h54
voila ce que cela me sort :
PHP Version 5.1.4

System Linux ns24052.ovh.net 2.4.33-grs-bipiv-ipv4-32-yukon #2 SMP lundi 21 mai 2007, 13:46:24 (UTC+0200) i686
Build Date Jun 14 2006 15:36:40
Configure Command './configure' '--prefix=/usr/local/php5' '--with-config-file-path=/usr/local/lib/php5' '--with-pear=/usr/share/php5' '--with-dbase' '--with-filepro' '--with-xml' '--enable-exif' '--enable-ftp' '--with-db' '--enable-bcmath' '--enable-calendar' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-gettext' '--with-zlib-dir' '--enable-trans-sid' '--with-imap' '--with-kerberos' '--with-imap-ssl' '--with-openssl' '--enable-sysvsem' '--enable-sysvshm' '--with-dom' '--with-mcrypt' '--with-iconv' '--enable-mbstring=all' '--enable-mbregex' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-mysql=/usr' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--enable-cgi'
Server API CGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php5/php.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib, https, ftps, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies




ssh2
libssh2 version 0.14
banner SSH-2.0-libssh2_0.14
remote forwarding enabled
hostbased auth enabled
polling support enabled
publickey subsystem enabled

Une idee d'ou viens le probleme je seche trop la ... snif

The Destroyeur
25/06/2007, 22h14
créé une page php ac sa:

Code PHP:
phpinfo();
?>

cejimagie
25/06/2007, 21h24
heuuu...
voici ce qu'il y as dans mon php.info ...
c'as te dit ...
/* $Id: phpinfo.php,v 2.5 2005/11/22 11:58:37 cybot_tm Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:


/**
* Gets core libraries and defines some variables
*/
define( 'PMA_MINIMUM_COMMON', true );
require_once('./libraries/common.lib.php');


/**
* Displays PHP information
*/
if ( $GLOBALS['cfg']['ShowPhpInfo'] ) {
phpinfo();
}
?>
celui du serveur biensur ?? pas celui du site qui contient la commande php par hasard ??

The Destroyeur
25/06/2007, 20h46
JE vois rien à chanegr, tu as penser à rebooter ton serveur sshd ? Et autre chose, si il met l'erreur php ac la lib, C qu'elle est pas installée ...

Tu as pensé à checker le phpinfo ?

cejimagie
25/06/2007, 20h32
Re .. justement c'est pour cela que j'en ai mit tres peu en tous seulement 66 slots c'est tout ...
pour mon ssh2 tu ne voit pas ce qui pourrais poser probleme est ce ca par hasard : ?

ssh.config
# $OpenBSD: ssh_config,v 1.21 2005/12/06 22:38:27 reyk Exp $

# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

# Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
oubien ceci

sshd.config
# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys2

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /usr/lib/misc/sftp-server
IgnoreRhosts yes
IgnoreUserKnownHosts no
PrintMotd yes
StrictModes yes
RSAAuthentication yes
PermitEmptyPasswords no
à modifier manuellement ???
et pour ton site ...
trois question en une je suis peut etre un peu exsigeant ...
merci toi ?

The Destroyeur
25/06/2007, 20h20
Sur un start 100, tu sais pas mettre bcp de serveur CSS, sa lag trop ..

cejimagie
25/06/2007, 19h27
Hello the destoyer ...
Merci pour ta reponse mais malheureusement je suis sous gentoo release2 j'ai fait tout comme tu as dit .; mais que neni toujours que dalle ... lol
ce fammeu Fatal error: Call to undefined function: ssh2_connect() in /home.5/k/a/l/kalamit/www/log/testconnect.php on line 3

est toujours la ..; sniffffff
une autre idee ??? ce serais super ..
Par contre je suis inscrit sur ton site car justement j'etais en train de developper un control panel de mon cote avec interaction sur une base mysql ..
mais..
il n'y as pas ta version de gc ..sniff again ...
bon j'espere qu'n jour se truc marcheras ..
as si si vous avez une idee j'ai installer sur un start 100 ml ++ sur gentoo release 2 trois serveur css 1 32 slots tick 66 ,1 22 slots tick 100 et un 12 slots tick 100 mais j'ai un lag de fou des que le nombres de joueurs arrive à plus de 13 .. grrrrr .. j'ai une charge cpu de 18 à 27% quand je lance la commande top ..mais quand le nombres de joueurs arrive a 13 il passe vers 97% et ne redescent plus mm si les gens partent...

help me mes amis ...

The Destroyeur
22/06/2007, 11h22
C'est que tu as ta lib n'est pas installée dans le php ... Il suffit pas de compiler la libssh2 et c'est bon ! Il faut aller dans php.ini et ajouter extension=ssh2.so ...

Et si tu es sous gentoo release 2, tu dois aller dans webmin, serveur, serveur sshd, authentificaiton et cocher la case autoriser connexion par mot de passe et la sa marchera encore mieux

cejimagie
21/06/2007, 22h53
Bonjour à tous...
Je suis en gentoo ovh release 2
j'ai suivi le tuto ci dessus à la lettre .
j'ai essayer tous les truc dans les addresse ci dessous dont le module pearl .
http://search.cpan.org/~drolsky/Net-...H/Perl/SSH2.pm
http://www.alionet.org/lofiversion/i...hp/t15526.html
http://linux.jpvweb.com/php-ssh2.html
http://www.manuelphp.com/php/function.ssh2-exec.php
http://lab.erasme.org/ssh2/index.html

J'ai bien sur rebooter à chaque fois mon serveur ...

d'une page php sur un autre serveur je lance ceci :

Code:
ou encore

Code:
testetsls');
?>
ou encore

Code:
mais toujours rien je n'arrive pas à me connecter...

Le but pour moi est de lancer un fichier sh par une page php

j'ai toujours la meme erreur :

Fatal error: Call to undefined function: ssh2_connect() in /home.5/k/a/l/kalamit/www/log/testconnect.php on line 3

j'ai aussi modifier bein sur mes fichiers dans etc/ssh/ les deux fichier mais la un peu bidouller car je n'y arrive pas .....

quelqu'un peu t'il m'aider jsuis perdu ca fait plusieurs moi que je suis dessus je ne trouve rien ....

svp vraiment besoin d'aide .
mon add claudecs@hotmail.fr
merci

The Destroyeur
15/06/2007, 15h53
Non tu dois pas avoir de probleme ^^

Le pannel GCP sera bientot dispo, tu peux me donner ton msn please ?


-> Tu dois allé dans la configuration du serveur SSHD, et autoriser la connexion par mot de passe ^^ J'avais la blague

noricorum
15/06/2007, 15h26
Salut,
Je viens de suivre tes instructions, j'ai bien le ssh dans le phpinfo, mais lorsque je fais la commande ssh2_auth_password() j'ai comme retour
Authentication failed for root using password in /home/ovh/www/manager/index.php on line 27


je suis en gentoo ovh2 (avec suphp) peut etre la le probleme ?

nimoy
27/03/2007, 23h29
Citation Envoyé par The Destroyeur
Oh C bon

Oui je sais, mais pour gentoo, j'ai tout essayer, et C la seul facon dont j'y suis arrivêr ^^
Alors mets à jour ton script pour utiliser le PATH correct plutôt que de copier les binaires un peu bcp à la barbare

hach22
27/03/2007, 17h59
moi j'ai un piti problème...
quand tu seas sur msn je t'expliquerais, ca doit être un truc tout con... comme dab lol

The Destroyeur
27/03/2007, 17h41
Oh C bon

Oui je sais, mais pour gentoo, j'ai tout essayer, et C la seul facon dont j'y suis arrivêr ^^

nimoy
27/03/2007, 12h15
en mettant "/usr/local/php5/bin/" dans le PATH tu te simplifies énormément le boulot, le nombre de ligne et tu rends le tout plus clair

genre un "export PATH=/usr/local/php5/bin/:$PATH" irait bien tout en haut (si ce n'est directement mis dans ta conf)

Sinon encore plus simple si ton install contient PEAR : "pear install ssh2"
Le reste est à coup de dépendance et tu n'as rien à faire si ce n'est mettre là conf à jour

PS: "ca a marché ?"
je dis ca, je ne dis rien. Je ne suis pas une star en français mais certaines choses font mal

The Destroyeur
27/03/2007, 11h37
sa a marché ?

hach22
26/03/2007, 22h05
bravo,
merci surtout ^^

The Destroyeur
23/03/2007, 18h01
Bonjour à tous,
Voila ayant galéré plusieur mois sur cette ****** de lib ssh2, je vous propose un petit tutorial du comment l'installer POUR GENTOO!
Tout d'abord, elle sert à utiliser des commandes shell par commande php (bcp + évoluée que le shell_exec).

Vous pouvez trouvez toutes ces fonctionalité sur le site de php (http://fr.php.net/manual/fr/ref.ssh2.php)

Je vous conseil de travailler sur root pour installer la lib ^^

Bon, tout d'abord, on install la libssh2 sur le serveur. Pour installer la lib, il faut la "démasquer" :
echo "net-libs/libssh2 ~x86" >> /etc/portage/package.keywords
emerge libssh2
Si cela ne marche pas, tapper ceci (vous serez parti pour de looongue minute):
emerge --sync
Après cela, vous télécharger ssh2-0.10 (une lib pecl):
cd /
wget http://pecl.php.net/get/ssh2-0.10.tgz
tar -xzvf ssh2-0.10.tgz
Après cela, on se rend dans le dossier:
cd /ssh2-0.10
Maintenant, la partie la plus "compliquée" que j'ai chercher durant quelque ... *soupir* mois ...

cp /usr/local/php5/bin/phpize /ssh2-0.10/phpize
chmod 755 -R /ssh2-0.10
./phpize && ./configure --with-php-config=/usr/local/php5/bin/php-config --with-ssh2 && make

Maintenant, la libssh2 se trouve dans le dossier module !

cp /ssh2-0.10/modules/ssh2.so /usr/local/lib/php5/ssh2.so
cp /ssh2-0.10/modules/ssh2.la /usr/local/lib/php5/ssh2.la
echo "extension_dir = /usr/local/lib/php5" >> /usr/local/lib/php5/php.ini
echo "extension=ssh2.so" >> /usr/local/lib/php5/php.ini
Voila, maintenant la lib est installé et prête à l'emploi !!!