[rrd-users] Re: Problem with RRDs::graph and malformed header

Eric Lennon Bowman ebowman at boboco.ie
Tue Aug 15 19:14:38 MEST 2006


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
ebowman at boboco.ie
http://www.boboco.ie/ebowman/pubkey.pgp
+35317979094

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list