Re: INTERNAL SERVER ERROR (WIERD???)



wizard wrote:

> I am working on an script which is working with our email program of
> our company.
> Recently some changes were made to the script and it started giving he
> nasty " 500 INTERNAL SERVER ERROR".
> The Apache error logs give:-
> Premature end of script headers.

Is that the *last* message in the log, or the *only* message in the
log?

> Now, the script does execute and the email is sent but the webpage
> gives the error. Also, this error comes up only sometimes but not
> everytime we run the script in identical conditions, say one in three
> times. Sometimes when I go back to the previous page and again press
> the submit button , it goes properly. All the file permissions are
> proper, the /usr/bin/perl -w is right, Content type is correct, pert
> -cwT , all are checked , I mean , all the usual answers to the problem
> are checked and they are fine. If it were a syntax error, or some
> header problem , it would never have run ,

Not true. Just because the CGI script doesn't return proper HTTP
headers, doesn't mean that the other Perl code in the script can't run.

> but it is running well for
> the past 7 years. The changes that I made to it were nominal and they
> do not affect the output.

Says you. Perhaps you should tell us *what* changes you made, rather
than just asking us to take your word for it...

> Also, I dont know how to step run the script from a web browser. Also,
> I dont know where to look for the bug since it does run properly
> SOMETIMES.

What are the results of the script when run via the command line? What
is output? Are all the proper HTTP headers printed, in all possible
executions of the script?

Paul Lalli

.