* Isarin Sathitruangsak <hatyai at sdf.lonestar.org> [2004/08/05 15:18]:
> 
> 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

You need to emit a Content-type header before your data.  In this simply
case, it's simple as:

> #!/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 !";

print "Content-type: image/png\n\n";

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

(darren)

-- 
How you look depends on where you go.

Attachment: pgpftJF9hitUk.pgp
Description: PGP signature

  • [Templates] GD Isarin Sathitruangsak
    • Re: [Templates] GD Darren Chamberlain

Reply via email to