help with GD and gd

S

stig

hi.
in the text below, please observe that GD != gd.
the following CPAN-modules are installed:
GD 2.16 (also tried 2.05).
gd 2.0.33

perl is: v5.8.0 built for i386-linux-thread-multi

the above has been installed on one linux and one freeBSD computer.
i try to use GD to draw an image, in the image there is some text
created by GD.

we run the script in question on an apache web server.
when running the script it produces the following error:

Software error:
at ../../../keironlibs/ProtoArtResult.pm line 2631.

and leaves the following in the apache log:
[Fri Jan 21 08:37:33 2005] [error] [client 192.168.0.161] [Fri Jan 21
08:37:33 2005] skattning_resultat.pl: at
.../../../keironlibs/ProtoArtResult.pm line 2631. at
/usr/lib/perl5/5.8.0/CGI/Carp.pm line 301., referer:
http://xxxxxx.xxxxxx.xx/xxxxxxx/cgi-bin/admin/skattning_resultat.pl



we previously used gd 2.0.9, and that did not produce any errors, but
when we change to 2.0.33 the above error showed up.


the line that produces the error in question looks like this:
$im->stringTTF($black,FONT,10.0,0.0,15,12,"The text comes here
$FromAVariable") || die $@;

after some check it looks like the problem lies in the $FromAVariable.
this is based on the fact that other similar rows that produce text are
not giving this error and that the error disappears when i remove the
variable from the line.
the main problem seems to be that it contains some characters that gd
2.0.33 cannot cope with.

has anyone seen this problem?
what can be done about it?
can i transform the content of $FromAVariable to some format that gd
always understand?

many thanks
stig
 
S

stig

stig said:
hi.
in the text below, please observe that GD != gd.
the following CPAN-modules are installed:
GD 2.16 (also tried 2.05).
gd 2.0.33

perl is: v5.8.0 built for i386-linux-thread-multi

the above has been installed on one linux and one freeBSD computer.
i try to use GD to draw an image, in the image there is some text
created by GD.

we run the script in question on an apache web server.
when running the script it produces the following error:

Software error:
at ../../../keironlibs/ProtoArtResult.pm line 2631.

and leaves the following in the apache log:
[Fri Jan 21 08:37:33 2005] [error] [client 192.168.0.161] [Fri Jan 21
08:37:33 2005] skattning_resultat.pl: at
.../../../keironlibs/ProtoArtResult.pm line 2631. at
/usr/lib/perl5/5.8.0/CGI/Carp.pm line 301., referer:
http://xxxxxx.xxxxxx.xx/xxxxxxx/cgi-bin/admin/skattning_resultat.pl



we previously used gd 2.0.9, and that did not produce any errors, but
when we change to 2.0.33 the above error showed up.


the line that produces the error in question looks like this:
$im->stringTTF($black,FONT,10.0,0.0,15,12,"The text comes here
$FromAVariable") || die $@;

after some check it looks like the problem lies in the $FromAVariable.
this is based on the fact that other similar rows that produce text are
not giving this error and that the error disappears when i remove the
variable from the line.
the main problem seems to be that it contains some characters that gd
2.0.33 cannot cope with.

has anyone seen this problem?
what can be done about it?
can i transform the content of $FromAVariable to some format that gd
always understand?

many thanks
stig


i found the problem.
gd 2.0.33 does not allow string to be NULL or empty.
as soon as it is popoulated with anything it seems to work.

i'll get back if i stumble into other problems. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top