[Templates] GD

[prev] [thread] [next] [Date index for 2004/08/05]

From: Isarin Sathitruangsak
Subject: [Templates] GD
Date: 15:18 on 05 Aug 2004
Hi there,

I am not so sure how to use GD and hope someone could shed some light.

I've get this error when I tried to use GD with TT

[Thu Aug 05 10:48:14 2004] [error] [client 172.16.140.146] malformed 
header from script. Bad header=\x89PNG: tt


I just installed GD the other day and installed TT a while back.
I could run GD fine on a regular CGI script (without TT). I am not sure 
whether GD under TT is somehow linked (or should be)  to the new GD module 
that I just installed.

The odd thing it ran on comand line; yet I saw a string png which might 
throw off the error.


Thanks, Isarin



Here is my script:


===> tt

#!/dssweb/local-perl/bin/perl
use strict;
use Template;

my $tt = Template->new({
                         INCLUDE_PATH => '/dssweb/template',
                         INTERPOLATE  => 1,
                         }) || die "$Template::ERROR\n";

my $vars = "Hello !";

$tt->process('tst/gd.tmpl', $vars) || die $tt->error(), "\n";




===> gd.tmpl (pretty much an example from the tt2 site)

[% FILTER null;
         data = [
             ["1st","2nd","3rd","4th","5th","6th"],
             [    4,    2,    3,    4,    3,  3.5]
         ];

         USE my_graph = GD.Graph.pie(250, 200);
         my_graph.set(
                 title => 'A Pie Chart',
                 label => 'Label',
                 axislabelclr => 'black',
                 pie_height => 36,
                 transparent => 0,
         );
         my_graph.plot(data).png | stdout(1);
       END;
-%]






hatyai [at] sdf.lonestar.org
http://hatyai.gomen.org
SDF Public Access UNIX System - http://sdf.lonestar.org

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] GD
Isarin Sathitruangsak 15:18 on 05 Aug 2004

Re: [Templates] GD
Darren Chamberlain 15:26 on 05 Aug 2004

Re: [Templates] GD
Simon Wistow 15:27 on 05 Aug 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52