[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Strange apache cgi error.
- From: "A. Konstam" <akonstam trinity edu>
- To: seawolf-list redhat com
- Subject: Re: Strange apache cgi error.
- Date: Wed, 13 Jun 2001 09:18:48 -0500
On Wed, Jun 13, 2001 at 10:09:28AM -0400, Nalin Dahyabhai wrote:
> On Wed, Jun 13, 2001 at 08:56:23AM -0500, A. Konstam wrote:
> > On one of out apache servers whenever a cgi script is run it fails with
> > the following error in the error_log:
> >
> > [Wed Jun 13 08:50:50 2001] [error] [client 131.194.131.60] Premature
> > end of script headers:
> > /users/akonstam/Local/HTML-Documents/cgi-bin/test.cgi
> >
> > We are using apache-1.3.14-3
> >
> > Does anyone understand what this error means and how to fix it?
>
> This usually means that the CGI didn't output any headers before
> outputting the document itself. You need to provide at least a
> Content-Type header, followed by a blank line to mark the end of
> the headers, and then the document itself.
>
> In Perl:
> print("Content-type: text/html\n\n");
>
> In Python:
> print "Content-type: text/html\n\n"
>
> Hope this helps,
>
> Nalin
This is the simple cgi script I was using which seems to be ok. It
works on other machines:
#!/bin/bash
echo "Content-type: text/plain"
echo ""
echo "This is test"
Can you see a mistake in its construction?
--
-------------------------------------------
Aaron Konstam
Computer Science
Trinity University
715 Stadium Dr.
San Antonio, TX 78212-7200
telephone: (210)-999-7484
email:akonstam trinity edu
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]