Block, Ryan (Citco) wrote: > I have this script that prints a graph to stdout which runs fine from a > command line. When I run it via a web browser, I get the following error > in my apache log. Also, if I graph it to a file and then display the > file, it works fine. > > > malformed header from script. Bad header=\x89PNG > A web response is comprised of a header section, consisting of a collection of HTTP response headers which specify the type of the response, it's size, etc, followed by a data section. You are just sending the data down the response socket, without setting up the appropriate headers.
This is a relatively painless introduction to how HTTP works: http://www.jmarshall.com/easy/http/ Likewise, here's a simple example showing how to setup a simple cgi-bin response in apache: http://httpd.apache.org/docs/2.0/howto/cgi.html#writing cheers, Eric -- Eric Lennon Bowman BoboCo Ltd [EMAIL PROTECTED] http://www.boboco.ie/ebowman/pubkey.pgp +35317979094 -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-users WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
