httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: Premature end of script headers
Date Wed, 26 Jun 2002 08:07:34 GMT
This is a CGI/Perl-problem rather than Apache.
But, anyway, the error says that the script (or cgi-handler) outputs
something else than legal HTTP-headers, and is usually caused if your
program has an error in it. By looking in the error log you should see what
the script did output that caused the error. This is usually a perl error
message, which you can use to fix your code. If that is not helping, it's
just ordinarily debuging; strip everything but the print "Content-type:
text/ht..." (and replace "\r\n\r\n" with simply "\n\n"), and then add the
use statements, then the new statement, etc. untill you find the error.

Regards,
Robert Andersson

----- Original Message -----
From: "Qingjuan Gu" <qingjuan@wistar.upenn.edu>
To: <users@httpd.apache.org>
Sent: Tuesday, June 25, 2002 8:24 PM
Subject: Premature end of script headers


> Hi everybody,
>
> When I brwoser this perl script on the web broswer, it gives error:
> Internal Server Error
> The server encountered an internal error or misconfiguration and was
unable to complete your request
>
> In error.log:
> [Tue Jun 25 14:20:22 2002] [error] [client 130.91.8.66] Premature end of
script headers: /db4/usr/local/www/html_files/cgi-bin/emboss.pl
>
> But other cgi or perl script in the same directory work fine.
>
> I do not know hwat is wrong with this script, here is this script:
> #!/compbio/programs/perl-5.6.1/bin/perl5.6.1
>
> use CGI;
> use EMBOSS::GUI;
>
> my $cgi = new CGI;
> print "Content-type: text/html\r\n\r\n";
> init('/compbio/programs/emboss/share/EMBOSS',
'/compbio/programs/emboss/bin', '/db4/usr/local/www/html_files/html/EMBOSS',
'http://athena
> .wistar.upenn.edu/EMBOSS', 'http://athena.wistar.upenn.edu/cgi-bin', 0);
> for ($cgi->param("_action")) {
>         /^mmenu/        and do { mmenu($cgi); last; };
>         /^input/        and do { input($cgi); last; };
>         /^run/          and do { run($cgi); last; };
>         /^help/         and do { help($cgi); last; };
>         /^manual/       and do { manual($cgi); last; };
>         /^search/       and do { search($cgi); last; };
> }
> print "\n";
> ~
> Any idea will be appreciated greatly.
>
> Grace
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message