On Nov 29, 11:44 am, [EMAIL PROTECTED] (Ankur) wrote:
> Hi,
>
> I am receiving the following error : "Premature end of script headers"
> when running my CGI script using a web browser.
>
> Instead if I execute the script manually at the shell, it executes
> successfully. Actually, the script needs to fetch a lot of data from
> the database.
>
> I couldn't find any related reference for this error description on
> the web, though there are a lot of other references.

This has nothing to do with Perl and everything to do with CGI
programming.

My guess you forgot to print the HTTP Header.  You're claiming it
"works" on the command line, because you saw your HTML output appear
in the console window.  But did you also see something that looks
like:
Content-Type: text/html; charset=ISO-8859-1

If not, you've forgotten to print the header.  If you're using the CGI
module (and if you're not, you should be), just stick this line before
any of your print statements:
print header;

Paul Lalli


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to