in reply to Problem with CGI script.

Hi.

Thanks for the help so far. The most puzzling thing about this particular script is each time I execute it, I receive an 'Internal Server Error ( 500 )'. I upgraded the web server to 1.3.24.

Update: I checked the Apache error log and saw this:
127.0.0.1 Premature end of script headers.

I cannot see where that error would originate. Any ideas?
Thanks,
-Katie

Replies are listed 'Best First'.
Re: Re: Problem with CGI script.
by graff (Chancellor) on Aug 04, 2002 at 07:53 UTC
    Hmmm... I wonder if "Premature end of script headers" might be what happens when the script dies with an error message before it has written any valid html header or data. Maybe if you make sure to print your header first, in some way, before that bunch of '... or die "Error message\n";' instructions -- or else make up a subroutine that you call instead of "die", so that you generate some sort of sensible output for the browser (including the error message), then exit.