[rrd-users] Re: Newbie Help - RRDs::Graph and STDOUT
Serge Maandag
serge.maandag at staff.zeelandnet.nl
Thu May 22 09:23:26 MEST 2003
the print "ERROR... part isn't going to do you much good.
You already printed that an image/png is coming next, so the browser
will not display the errorstring.
You could better 'die' or 'warn' the error, that way it ends up in your
webservers error-log.
Also, I don't see why you print: <img src="/cgi-bin/rrdgraph3.cgi"
alt="">
It belongs in the part where you are writing html, not the part where
you are generating an image.
Serge.
-----Original Message-----
From: Block, Ryan FTL [mailto:RBlock at citco.com]
Sent: Wednesday, May 21, 2003 11:26 PM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Newbie Help - RRDs::Graph and STDOUT
I have a cgi script that is writing the output of RRDs::graph to STDOUT.
When I run the cgi from my web browser, all I get is a "cannot be
displayed
error". The script runs fine from command line.
Any suggestions on how to accomplish this would be appreciated. Here is
a
snippet of my code that is failing.
print "Content-type: image/png\n\n";
RRDs::graph("-", @args);
my $ERR = RRDs::error;
print "ERROR while creating $host: $ERR\n" if $ERR;
print qq(<img src="/cgi-bin/rrdgraph3.cgi" alt="">);
Ryan Block
WAN Engineer
Citco Technology Mgt.
rblock at citco.com
--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list