bug-gnats
[Top][All Lists]
Advanced

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

Re: Why GnatsWeb Fails to Create Graph Chart?


From: Hon-Chi Ng
Subject: Re: Why GnatsWeb Fails to Create Graph Chart?
Date: Tue, 2 Oct 2001 14:25:43 -0700

Hi

After struggling for a few days, I finally figured out the problem, with the
help from my sysadmin.  I would like to share it in case some one experiences
the same problem in the future.

The problem was due to my Gnuplot was installed with dynamically linked
library ("shared object" in Solaris term) of PNG library.

I could run "opened_vs_closed.pl" on Unix command-line without problem
because I had $LD_LIBRARY_PATH correctly set when I logged on to the Solaris
box serving Apache web server.

However, the virtual user running the web server didn't have the correct
$LD_LIBRARY_PATH set.  Hence, it failed when being run as CGI script.

To fix it, I changed line 23 of "gnats/charts.pm" to

  $GNUPLOT = 'LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/gnuplot';

and "opened_vs_closed.pl" worked perfectly, even with chart in PNG format.

BTW, Yngve, I would like to suggest enhancing "gnats/charts.pm" such that
the "new" subroutine accepts an argument to specify whether to generate GIF
or PNG format.

In addition, it would be nice if "charts/*.pl" will read the
"@GNATS_LOGIN_DATA" from "gnatsweb-site.pl" instead of hard-coding it in
themselves.

Thanks.

Hon-Chi


> From: "Hon-Chi Ng" <honchi_ng@my-deja.com>
> To: yngve.svendsen@clustra.com
> Cc: bug-gnats@gnu.org
> Subject: Re: Why GnatsWeb Fails to Create Graph Chart?
> Date: Sat, 29 Sep 2001 23:49:54 -0700
>
>Hi Yngve
>
  ...
>
>No, my web browser is fine.
>
>In fact, I was using my web browser to verify the PNG generated by running
>"opened_vs_closed.pl" using the command-line.
>
>The error message returned by "opened_vs_closed.pl" on browser
>  Software error:
>  Died at ../gnats/chart.pm line 309, <SOCK> line 65.
>
>was pointing to the line 309 of chart.pm, in subroutine "_read_img_file",
>statement
>
>    open(IMG, $img_file) || die;
>
>I verified by checking the /tmp directory on my web server, where
>
>  /tmp/wwwgnats.chart.2.$pid
>
>was failed to be generated, even though both data files were correctly
>generated.
>
>  /tmp/wwwgnats.chart.0.$pid
>  /tmp/wwwgnats.chart.1.$pid
>
>
>Thanks for your prompt response.
>
>Hon-Chi
>


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



reply via email to

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