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
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to