It is my test script and pretty much I took it from module's documentation.
**** The odd thing is that it ran fine on command line but failed on the browser.*******
According to my googling search, it might be something to do with LD_LIBRARY_PATH or RPATH. I located the path for libgcc.so.1 and
added it to LD_LIBRARY_PATH but it didn't help. I don't know how
to add it to RPATH. When I installed both modules, they passed
the make tests.
Anyways, here is my code:
#!/dssweb/local-perl/bin/perl
use strict; use warnings; use diagnostics; use GD::Graph::pie; use CGI;
my @data = ( ["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"], [ 1, 2, 5, 6, 3, 1.5, 1, 3, 4], [ sort { $a <=> $b } (1, 2, 5, 6, 3, 1.5, 1, 3, 4) ] );
my $graph = GD::Graph::pie->new(400, 300);
my $format = $graph->export_format; my $q = new CGI; print $q->header("image/$format"); binmode STDOUT; print $graph->plot([EMAIL PROTECTED])->$format();
On Wed, 4 Aug 2004, Sean Davis wrote:
Date: Wed, 4 Aug 2004 10:27:10 -0400 From: Sean Davis <[EMAIL PROTECTED]> To: Isarin Sathitruangsak <[EMAIL PROTECTED]> Subject: Re: GD.pm and GD::Graph
You'll have to send some code.
Sean
On Aug 4, 2004, at 10:20 AM, Isarin Sathitruangsak wrote:
Hello.
Could someone could shed some light what I should do. Please point me if I should send to a different list.
Although my script ran fine on the command line. I've got the following errors when running my script on apache
[Tue Aug 03 15:54:14 2004] [error] [client 172.16.140.146] Premature end of script headers: graph
[Tue Aug 03 15:54:14 2004] [error] [client 172.16.140.146] Uncaught exception from user code:
[Tue Aug 03 15:54:14 2004] [error] [client 172.16.140.146] \tCan't load '/dssweb/local-perl/lib/site_perl/5.8.\
3/sun4-solaris/auto/GD/GD.so' for module GD: ld.so.1: /dssweb/local-perl/bin/perl: fatal: libgcc_s.so.1: open \
failed: No such file or directory at /dssweb/local-perl/lib/5.8.3/sun4-solaris/DynaLoader.pm line 229.
[Tue Aug 03 15:54:14 2004] [error] [client 172.16.140.146] at /dssweb/local-perl/lib/site_perl/5.8.3/GD/Graph\
/pie.pm line 20
[Tue Aug 03 15:54:14 2004] [error] [client 172.16.140.146] Compilation failed in require at /dssweb/local-perl\
/lib/site_perl/5.8.3/GD/Graph/pie.pm line 20.
[Tue Aug 03 15:54:14 2004] [error] [client 172.16.140.146] BEGIN failed--compilation aborted at /dssweb/local-\
perl/lib/site_perl/5.8.3/GD/Graph/pie.pm line 20.
[Tue Aug 03 15:54:14 2004] [error] [client 172.16.140.146] Compilation failed in require at /dssweb/apache2/cg\
i-bin/tst/graph line 6.
[Tue Aug 03 15:54:14 2004] [error] [client 172.16.140.146] BEGIN failed--compilation aborted at /dssweb/apache\
2/cgi-bin/tst/graph line 6.
Thanks, Isarin
[EMAIL PROTECTED] SDF Public Access UNIX System - http://sdf.lonestar.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
hatyai [at] sdf.lonestar.org http://hatyai.gomen.org SDF Public Access UNIX System - http://sdf.lonestar.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>