in reply to Perl/Apache Error

If you run your CGI script from the command line, as in perl -w my_cgi_script.pl, do you still get an error?

The advantage of running the script from the command line is that you often get a more descriptive error message, including line number where the error occurred.

I would say that ninety-nine percent of the time I get the premature-end-of-header CGI error the problem has nothing to do with CGI and the script won't run from the command line either.

Replies are listed 'Best First'.
Re: Re: Perl/Apache Error
by fastkeys (Novice) on Mar 05, 2001 at 04:15 UTC
    I have bowed to the superior knowledge of my fellow monks and used CGI.pm FYI, I got no error on the command line, only when run through the webserver. (and what I posted was the error log :) ) Thanks for your help Alex