Need to test this Captcha on somebody's Perl

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Ok, here it goes.  My server with Perl is kept and maintained at one of
those ISP warehouses.  The truth is I am no SA, so couldn't build a Perl

I started using Authen::Captcha and needed more so added
GD::SecurityImage::AC.  But what happened was that whenever I try to use a
TTF font, no text appears, and   $@  contains

"libgd was not built with FreeType font support  "

My server people said they did the rebuild twice "The first time I used the
source RPM... the second time I
used the latest source provided by GD's website"  and that settles it on
their end.

As for the font path or file itself being good, we're using the same path
and file on a simple PHP file, so that's all good.

Here is what I was wondering.  Does anyone have a Perl system setup that can
run the script below?  It is very short, and if you alternate between TTF &
Normal  (lines 38 & 39) you either get a full captcha image   or one with no
text and an error.

I have to try something to find out what is wrong here.



use warnings;
use strict;
use CGI;
use GD::SecurityImage::AC;
no warnings 'uninitialized';

my $q = new CGI;

my ($md5sum) = MakeCaptcha();

my $errr = $@;

my $out = $errr;

$out .= qq^&nbsp;<p><img border = "0" src="../cap_output/^ . $md5sum .

print $q->header();
print $out;
exit 0;

sub MakeCaptcha

    my $number_of_characters = 4;
    my  $captcha = Authen::Captcha->new();
        $captcha->gdsi(new => {
 lines   => 2,
 width => 132,
 height => 57,
 scramble => 0,
 angle => 45,
 font     => "/usr/local/fonts/comic.ttf",
 ptsize   => 12,
 create=> [ttf=>'defualt', '#3333AA', '#AA3333'],
# create=> [normal=>'defualt', '#3333AA', '#AA3333'],


    my ($md5sum,$chars) = $captcha->generate_code( $number_of_characters );

    return $md5sum;

Re: Need to test this Captcha on somebody's Perl

Quoted text here. Click to load it


Don't know if this fixes things, but it might be causing a problem.

John                   Small Perl scripts:
               Perl programmer available:
                                        I ploink :-)

Re: Need to test this Captcha on somebody's Perl

Quoted text here. Click to load it
thanks anyway but it turned out i was right, and my isp was wrong, a rarity!
took them three times to recompile the GD module and finally get it right.

for anyone in my situation, where you only know a bit of Perl and your ISP
is just poo-pooing you am including a script i found online.  it's a GD
tester and was part of a download provided by at .

in the zip download there is a file called gdtest.cgi and that was enough to
convince my ISP to look again at their end.  whew!


Site Timeline