For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > February 2005 > Re: Premature end of script headers









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Premature end of script headers
Chris Devers

2005-02-08, 3:55 pm

On Tue, 8 Feb 2005, vishwas bhakit wrote:

> I am getting [the] following error.
>
> Premature end of script headers
>
> Can anybody [please] tell me
> what is the cause of this[question mark]
>
> [Thanks] in advance


As noted in the last reply to you, it is impossible to give any
constructive advice if you don't show the code that is producing the
error. If you post no code, you'll go no useful response.

That said, this error usually means that the program is not sending the
standard content-type declaration before other output. Depending on how
you're writing your code -- a matter that is a complete mystery at this
point -- you can either have CGI.pm do this, or you can simply write --

print "Content-type: text/html\n\n";

-- before you emit any other output.

Also, this is a CGI question, so please post it to that list and ONLY to
that list. It helps nothing to cross-post, and only annoys people.


--
Chris Devers
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com