bug-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why GnatsWeb Fails to Create Graph Chart?


From: Hon-Chi Ng
Subject: Why GnatsWeb Fails to Create Graph Chart?
Date: Fri, 28 Sep 2001 21:10:46 -0700

Hi

I'm using
  GNATS 3.113
  GnatsWeb 2.9.0
  Gnuplot 3.7.1
  Apache 1.3.12
  Perl 5.6.1
  CGI.pm 2.752

and I tried to view chart through my web browser using the following
GnatsWeb CGI script.

  http://myhost/cgi-bin/gnatsweb/charts/opened_vs_closed.pl

Unfortunately, it returned the following error message to my browser.

  Software error:
  Died at ../gnats/chart.pm line 309, <SOCK> line 65.

After some investigation, I found out that "opened_vs_closed.pl" failed to
generated

  /tmp/wwwgnats.chart.2.$pid

although both data files were correctly generated.

  /tmp/wwwgnats.chart.0.$pid
  /tmp/wwwgnats.chart.1.$pid


So, I logged into "myhost", and I was able to successfully ran the script
using the following command.

  $ PATH=/usr/bin cgi-bin/gnatsweb/charts/opened_vs_closed.pl > /tmp/chart.out

Then, after trimming the 1st 2 lines using the following command, I was able
to view the graph.

  $ sed '1,2d' /tmp/chart.out > /tmp/chart.png

The 1st 2 lines in "chart.out" are:
  Content-Type: image/png
and newline.


I have to change to PNG instead of GIF since Gnuplot 3.7.1 no longer
supports GIF output.

Here are what I have changed to output PNG.

a) cgi-bin/gnatsweb/charts/opened_vs_closed.pl 

    Line 8: @GNATS_LOGIN_DATA = ('mygnats', 1529, 'mydb', 'guest', 'guest');

    Line 14: print header('image/png');

b) cgi-bin/gnatsweb/gnats/chart.pm

    Line 246: set term png small color


Question:
Why won't "opened_vs_closed.pl" work via cgi-bin on web server, but yet it
works via command-line?

Did I mess up "opened_vs_closed.pl" by changing it to output PNG format?  If
so, what is the correct way to make it output PNG format?


Thanks.  I appreciate your help.

Hon-Chi


------------------------------------------------------------
--== Sent via Deja.com ==--
http://www.deja.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]