SSH2 mit XAMPP Installieren: ssh2.so kann nicht kompiliert

Irgendwelche Probleme mit XAMPP für Linux? Dann ist hier genau der richtige Ort um nachzufragen.

SSH2 mit XAMPP Installieren: ssh2.so kann nicht kompiliert

Postby domatrix » 21. April 2007 15:43

Guten Tag,

ich habe ein schwerwiegendes Problem. Ich möchte mittels PHP mich auf meinen Server über das SSH2 Protokoll anmelden und den Server somit steuern.

Ich habe auf meinem Server Mandriva Linux 2006 und XAMPP installiert

Für SSH2-Unterstützung benötigte ich folgende Programme

Code: Select all
- zlib-1.2.3.tar.gz (->erfolgreich kompiliert)
- openssl-0.9.8e.tar.gz (->erfolgreich kompiliert)
- libssh2-0.14.tar.gz (->erfolgreich kompiliert)
- ssh2-0.10.tgz (-> kann ich nicht kompilieren)


Das SSH2-Paket (ssh2-0.10.tgz) für PHP kann ich leider nicht kompilieren! Wenn ich das SSH2-Paket kompiliere erhalte ich die ssh2.so Datei, die eine PHP extension für SSH2 Unterstützung darstellt.

Versuche die SSH2 Extension für PHP zu installieren:

Versuch 1: PECL verwenden (Automatische Installation)
Code: Select all
$ /opt/lampp/bin/pecl install ssh2-beta

Folgende Meldung wird ausgegeben:
downloading ssh2-0.10.tgz ...
Starting to download ssh2-0.10.tgz (22,187 bytes)
........done: 22,187 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
ERROR: `phpize' failed


Versuch 1: Manuell kompilieren
Code: Select all
$ wget http://pecl.php.net/get/ssh2-0.10.tgz
$ tar -xvfs ssh2-0.10.tgz
$ cd ssh2-0.10

Die folgenden 3 Schritte kompilieren die SSH2 Extension
$ /opt/lampp/bin/phpize
$ ./configure
$ make

Folgender Fehlercode erscheint (ist verkürzt)
[...]
/usr/include/sys/stat.h:298: error: storage class specified for parameter 'mkfifo'
/usr/include/sys/stat.h:325: error: storage class specified for parameter '__fxstat'
/usr/include/sys/stat.h:327: error: storage class specified for parameter '__xstat'
/usr/include/sys/stat.h:329: error: storage class specified for parameter '__lxstat'
/usr/include/sys/stat.h:357: error: syntax error before '__mode_t'
/usr/include/sys/stat.h:358: error: storage class specified for parameter '__xmknod'
/usr/include/sys/stat.h:365: error: storage class specified for parameter 'stat'
/usr/include/sys/stat.h:365: error: redefinition of parameter 'stat'
/usr/include/sys/stat.h:208: error: previous definition of 'stat' was here
/usr/include/sys/stat.h:365: error: syntax error before '{' token
In file included from /opt/ftp/ssh2-0.10/php_ssh2.h:24,
                 from /opt/ftp/ssh2-0.10/ssh2.c:25:
[...]
/opt/ftp/ssh2-0.10/ssh2.c:611: error: syntax error before 'if'
/opt/ftp/ssh2-0.10/ssh2.c:634: error: redefinition of parameter 'username'
/opt/ftp/ssh2-0.10/ssh2.c:608: error: previous definition of 'username' was here
/opt/ftp/ssh2-0.10/ssh2.c:634: error: parameter 'passphrase' is initialized
/opt/ftp/ssh2-0.10/ssh2.c:635: error: redefinition of parameter 'username_len'
/opt/ftp/ssh2-0.10/ssh2.c:609: error: previous definition of 'username_len' was here
/opt/ftp/ssh2-0.10/ssh2.c:637: error: syntax error before 'if'
make: *** [ssh2.lo] Fehler 1


Wie ihr also seht, funktioniert variante eins, die mit PECL automatisch das Packet herunterlädt und installiert nicht, weil "phpize failed".

Variante zwei funkioniert nicht, weil vermutlich unter /ext etliche Dateien fehlen. Auf meinem Server ist der Ordner /ext nicht vorhanden.

Ich muss nur noch SSH2.so erstellen und in der php.ini
Code: Select all
extension=ssh2.so

eintragen. So viel Arbeit und es scheitert ausgerechnet bei der letzten Aufgabe, die SSH2 Erweiterung für PHP zu kompilieren.

Kann mir jemand helfen? Ich finde auch keine vorkompilierte "SSH2.so" für Mandriva Linux 2006.

Vielen Dank für eure Antworten

domatrix
domatrix
 
Posts: 14
Joined: 21. April 2007 15:14

Return to XAMPP für Linux

Who is online

Users browsing this forum: No registered users and 29 guests