[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] Odd error under LinuxOS



>At 09:24 AM 9/13/00, robinmcf@altern.org wrote:
> >I'm getting a "Premature end of script headers" error when I shouldn't be

Kevin Hemenway wrote:
>Tail the webserver log where you're running this. Is there any more
>information in there? Add "use strict;" right after that "use CGI;" line,
>and then run it again. Any errors? Try removing the spaces on your fourth
>line there:
>
>         print $query->header;
though I'm not ruling out something obvious that I may have missed
programmatically speaking, this isn't my first CGI and though I haven't
tried Kevin's suggestion yet about checking for  unecessary spaces, I have
checked for  invisibles caused by the FTP or HTML transfer and/or file
system EOL markers. The logs file only contains the error message above
plus the path to what generated it. The CGI runs from the command line so
there aren't any problems as far as the path to the Perl interpreter is
concerned

David Steffen wrote:
>"Premature end of script headers" frequently means that the script
>had a syntax or other fatal error and exited before it could ever
>output the headers.  On a Mac, the error messages go to the browser.
>Under Linux, these go by default to the error log, though I think
>there are ways of redirecting them to the browser:

I have another script which uses the following declarations:

#!/usr/bin/perl5 -w
use strict;
use diagnostics-verbose;
use CGI;
use CGI::Carp qw(fatalsToBrowser);


but the script dies without generating Perl warnings of any kind, only the
system errors quoted above

David Steffen wrote:
>4) Make sure that all the modules you are "use"ing are installed on
>the Linux box.
I tried generating the content header manually (thinking CGI.pm might be
missing) but had the same result - no output except for the errors.

thanks for the suggestions guys however, and I'll go back over the scripts
to see if there's anything I might have missed that you've brought up

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org