Hallo Leute,
Ich habe folgendes Problem:
Ich habe ein Formmailer CGI geschrieben, mit Hilfe von Rolf und Cheatah ==> Danke, aber funktioniert nicht ganz richtig!!!
Ich habe zu erst auf meinem Rechner ausprobiert, es ist gegangen, aber auf dem Rechner der Provider geht nicht's mehr?!?!?!
Ich kriege folgende Fhler:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@xxx.ch and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
------------------------------------------------------------------
Apache/1.3.27 Server at www.xxx.ch Port 80
Ich habe Win2000Pro und Apache 2.0.43
Der Provider hat Unix-Rchner und Apache 1.3.27
Mein Script seht folgende massen aus:
------------------
#!/usr/bin/perl
use CGI ':standard';
use Net::SMTP;
$username = param('name');
$uservname = param('vname');
$addstr = param('str');
$addhnr = param('hnr');
$addplz = param('plz');
$addort = param('ort');
$addland = param('land');
$addtel = param('tel');
$addfax = param('fax');
$sender = param('email');
$subj = param('subject');
$text = param('comment');
$mailServer = 'smtp.xxx.ch';
$empfaenger = 'info@xxx.ch';
$smtp = Net::SMTP->new($mailServer) or error("Keine Verbindung zu SMTP Host *$mailServer*");
my $message = <<"MSGTEXT";
From: $sender
To: $empfaenger
Subject: $subj
Name/ Vorname: $username / $uservname
Strasse/ Nr.: $addstr / $addhnr
PLZ/ Ort: $addplz / $addort
Land: $addland
Tel.: $addtel
Fax: $addfax
Message:
$text
MSGTEXT
$smtp->mail($sender);
$smtp->to($empfaenger);
$smtp->data($message);
$smtp->quit;
print "Content-Type: text/html\n\n";
print << "END";
<HTML>
<HEAD>
<TITLE>Das ist ein Test</TITLE>
</HEAD>
<BODY bgcolor="#ffffff">
END
print "Die Mail wurde verschickt<BR>";
print << "END";
</BODY>
</HTML>
END
------------------------
Im Error.log steht folgendes:
[Sat Dec 7 15:43:30 2002] [error] [client 212.254.xxx.xxx] Premature end of script headers: /home/xxx.ch/cgi/mail.cgi
Ich habe mit ASCII-Modus transferiert.
Weiss jemand, wo könnte das problem legen????
Ich danke für eure Bemühungen im Voraus.
Gruss
x-VieW