CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
what is Premature end of script headers error?

 



abbireddy
New User

Nov 4, 2002, 5:54 AM

Post #1 of 4 (633 views)
what is Premature end of script headers error? Can't Post

Hi,

I am new to perl developement with CGI.

When I ran a sample of code it gives "Premature end of script headers" error.

What I need to check for this.
Please tell me..

advance Thanks.

With Regards,
Venkat.


Paul
Enthusiast

Nov 4, 2002, 6:46 AM

Post #2 of 4 (627 views)
Re: [abbireddy] what is Premature end of script headers error? [In reply to] Can't Post

What code do you have?

It normally means you:

a) Uploaded in binary
b) Forgot to print a header
c) Used the wrong path to perl


davorg
Thaumaturge / Moderator

Nov 6, 2002, 8:22 AM

Post #3 of 4 (619 views)
Re: [abbireddy] what is Premature end of script headers error? [In reply to] Can't Post

Your program returned an error message before returning the HTTP headers. The problem will almost certainly be described in more detail in your web server error log.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


andy7t
User

Nov 6, 2002, 11:12 AM

Post #4 of 4 (617 views)
Re: [davorg] what is Premature end of script headers error? [In reply to] Can't Post

I get this error a lot, and it mostly means that i have not CHMOD 755.

But, most of the time, i just think what it really means is:
"I can't be bothered to get your script to work, even though there is absolutly nothing wrong with".

I've left a script like this and come back the next day to find it works.

My advise is to use a proper log:

Add this to the top of your Perl Scripts.


BEGIN {
open (STDERR, /pathtoyourcgi-bin/cgierror.txt");
}

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives