Jeremy,
Whereas I should use the form, now I'm frustrated as to why it's doing this.
Here's the call in my CGI program:
print "Content-type: text/html\n\n";
system("/path/to/analog-4.04/analog -G ".
" +g/path/to/logs/analog2.conf".
" +logfile$loglocation");
What's happening, when I run it from the command line, the first thing is:
Content-type: text/html
Log results.
If I pipe the output to a file, or when it tries to go to the html page the logs
come first, and the *last line* of the file is the Content-type. Which causes
the Malformed header errors I'm getting.
Any thoughts on how to keep everything in the output in order? CanI edit a
config file somewhere that will let me modify the header that analog returns?
Thanks,
--John
Jeremy Wadsack wrote:
> John Anderson wrote:
>
> > Hi - I wrote a cgi that I would like to kick the report to stdout. The
> > program runs fine from command line, but when I run it on the website in
> > my CGI, I get an Internal Server Error (500) and this is the error my
> > logs get:
> >
> > malformed header from script. Bad header=<!DOCTYPE HTML PUBLIC "-//IETF:
> > /path/to/logs/index.cgi
> >
> > Am I missing something really easy here?
> >
> > My CGI does the standard:
> > print "Content-type: text/html\n\n";
> >
> > Then I run the analog command.
>
> You might need to configure the CGI or server for NPH. Can you run other CGI
> programs on your server? For that matter, why not just use the Analog Form
> interface which DOES work, does send the reports to the browser and includes
> most of the security checks that you'd have to include in your script?
>
> HTH,
>
> Jeremy Wadsack
> Wadsack-Allen Digital Group
>
> ------------------------------------------------------------------------
> This is the analog-help mailing list. To unsubscribe from this
> mailing list, send mail to [EMAIL PROTECTED]
> with "unsubscribe" in the main BODY OF THE MESSAGE.
> List archived at http://www.mail-archive.com/[email protected]/
> ------------------------------------------------------------------------
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------