On Sun, 7 Dec 2003, Kaiko Kaur wrote:
>
> Hi,
>
> I made perl CGI script which makes png files on the fly
> (using GD.pm). Everything was ok until I wanted to run it
> with ModPerl::Registry (to get it faster).
>
> Here is script (mkpng.cgi):
> #!/usr/bin/perl
> use GD;
> binmode STDOUT;
> $p = new GD::Image(20,20); $p->colorAllocate(255,255,255);
> $p->stringFT($p->colorAllocate(0,0,0),'/tmp/verdana.ttf',10,0, 0,12, 'ok');
>
> open F, ">/tmp/testlog"; print F $@; close F;
>
> print "Content-Type: image/png\n\n";
> print $p->png;
> undef $p
>
> This works ok as CGI (/tmp/testlog is empty after run). I can see image
> where is "ok".
>
> Now I write to .htaccess:
> <Files mkpng.cgi>
>   DefaultType image/png
>   SetHandler perl-script
>   PerlResponseHandler ModPerl::Registry
> </Files>
>
> and remove line
> print "Content-Type: image/png\n\n";
> from mkpng.cgi
>
> This produce white image without any text and /tmp/testlog contain:
> libgd was not built with FreeType font support
>
> Where the problem can be? What should I do? help me...
>
> Some more information what can be useful:
> # ldd /usr/lib/libgd.so
>         libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x4003b000)
>         libfreetype.so.6 => /usr/X11R6/lib/libfreetype.so.6 (0x4005a000)
>         libpng.so.3 => /usr/lib/libpng.so.3 (0x4009b000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x400c6000)
>         libm.so.6 => /lib/libm.so.6 (0x400d5000)
>         libc.so.6 => /lib/libc.so.6 (0x400f8000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

It might be that mod_perl isn't seeing the location of the
freetype library. Try passing in /usr/X11R6/lib as the
value of the LD_LIBRARY_PATH environment variable into your
script.

-- 
best regards,
randy kobes

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to