Hi. Danke jetzt gehts. Gruss Christian Am Montag 20 Oktober 2003 23:53 schrieben Sie:
Christian Kienle wrote:
#include
int main( void ) { printf("hallo welt");
return 0;
}
Füge vor
printf("hallo welt");
noch folgende Zeile ein:
printf("Content-type: text/html\n\n");
ein. Da smüsste funktionieren.
Gruß Sascha
Am Montag 20 Oktober 2003 23:48 schrieben Sie:
Davon ausgehend, dass es sich um eine Perl Script handelt, dass in etwa so aussieht:
-------------------- #!/usr/bin/perl -w print "Hallo\n"; --------------------
Schätze ich mal, dass Du vergessen hast die Folgende Zeile auszugeben:
print "Content-type: text/html\n\n";
Wenn irgendetwas vor dieser Zeile an den Browser geschickt wird, dann kann der Fehler kommen.
Wenn es das nicht ist, dann schick doch bitte mal Dein Script mit ...
Gruß Sascha
Christian Kienle wrote:
Hallo,
ich habe nun endlich einen Apache laufen. (ging recht einfach über Yast). Es läuft auch alles super gut!
PHP - läuft MySQL - läuft PHP My Admini - läuft Cgi - läuft nicht.
Sobald ich versuche ein CGI Script zu starten bekomme ich einen 500er Fehler.
Server error!
The server encountered an internal error and was unable to complete your request.
Error message: Premature end of script headers: hallo.cgi
If you think this is a server error, please contact the webmaster.
Error 500
localhost Mon Oct 20 23:34:37 2003 Apache/2.0.47 (Linux/SuSE)
Hier ein kleiner Auszu aus der Error Log:
[Sun Oct 19 23:20:04 2003] [notice] Apache/2.0.47 (Linux/SuSE) configured -- resuming normal operations [Sun Oct 19 23:50:28 2003] [notice] caught SIGTERM, shutting down [Mon Oct 20 06:41:49 2003] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] [Mon Oct 20 06:41:49 2003] [notice] suEXEC mechanism enabled (wrapper: /usr/ sbin/suexec2) [Mon Oct 20 06:41:55 2003] [notice] Apache/2.0.47 (Linux/SuSE) configured -- resuming normal operations [Mon Oct 20 18:29:29 2003] [error] [client ::1] File does not exist: /srv/www/ htdocs/susehelp [Mon Oct 20 23:07:32 2003] [error] [client ::1] File does not exist: /srv/www/ htdocs/cgi-bin [Mon Oct 20 23:07:49 2003] [error] [client ::1] File does not exist: /srv/www/ htdocs/cgi-bn [Mon Oct 20 23:07:56 2003] [error] [client ::1] File does not exist: /srv/www/ htdocs/cgi-bin [Mon Oct 20 23:08:49 2003] [error] [client ::1] script not found or unable to stat: /srv/www/cgi-bin/hallo.cg [Mon Oct 20 23:08:54 2003] [error] [client ::1] Premature end of script headers: hallo.cgi [Mon Oct 20 23:10:13 2003] [error] [client ::1] Premature end of script headers: hallo.cgi [Mon Oct 20 23:11:10 2003] [error] [client ::1] Premature end of script headers: hallo.cgi [Mon Oct 20 23:11:11 2003] [error] [client ::1] Premature end of script headers: hallo.cgi [Mon Oct 20 23:11:12 2003] [error] [client ::1] Premature end of script headers: hallo.cgi [Mon Oct 20 23:23:31 2003] [error] [client ::1] Premature end of script headers: hallo.cgi [Mon Oct 20 23:28:49 2003] [error] [client ::1] Premature end of script headers: hallo.cgi
Falls ihr weitere Daten benötigt lasst es mich wissen. Datei hat chmod 755. Habe es auch schon als root versuche -> selber Fehler.
Gruss und schonmal Danke!
-- ------------------------------------------------------ Christian Kienle tel: +49 (0)160 9351 4305 http://www.QtForum.org ~ an international Qt forum