Need to test this Captcha on somebody's Perl



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
setup.

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.

Thanks.


#!/usr/bin/perl

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 .
qq^.png">^;

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'],
);

$captcha->data_folder('../cap_data');
$captcha->output_folder('../cap_output');
$captcha->debug(2);

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


return $md5sum;
}


.



Relevant Pages

  • ANNOUNCE: UnixODBC 0.31
    ... UnixODBC provides a toolkit for writing Perl ODBC clients. ... - Installing and Configuring the Bridge Server ... UnixODBC.pm provides Perl programs with a subset of the X/Open ... Bridge Server," below. ...
    (comp.lang.perl.modules)
  • POP3 Mail Client in PERL using IO::Socket module only and regular expressions
    ... I am writing a POP3 Client program in Perl. ... Server and have a running conversation with the mail server using ... print $socket "STAT",CRLF; ...
    (comp.lang.perl.misc)
  • Solved: Perl/NFS "Text File Busy" Error And Related Problems
    ... Â That means I am actually editing the Perl file on ... and I am running it on another (my server). ... The first problem I had was that when I saved my script through NFS, ... apt-get install nfs-kernel-server ...
    (Debian-User)
  • Perl on Linux and SQL Server 2000 on Windows
    ... There was a time when I did a lot of searching on ways to use Perl ... sitting on Linux to connect SQL Server 2000 sitting on Windows. ... cpan> install DBI ... Install FreeTDS ...
    (comp.os.linux.misc)
  • SOLVED: "Text File Busy" And Other Frustrating NFS/Perl Errors
    ... Perl file on one computer, ... and I am running it on another (my server). ... The first problem I had was that when I saved my script through NFS, ... searched newsgroups on Usenet and mailing lists and general Google searches ...
    (comp.lang.perl.misc)