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:[EMAIL PROTECTED] Sent: Wednesday, May 21, 2003 11:26 PM To: [email protected] 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. [EMAIL PROTECTED] -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
