imagettftext is not working for my host, help?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

imagettftext is not working for my host, help?

Post by kaisellgren »

Hi,

I have created an awesome CAPTCHA, however my CAPTCHA does not work in my web host.

I have tested several times and I have found out the reason. The reason is the function imagettftext().

When I replaced imagettftext() function with imagestring(), all worked fine. I would like to know is there any way to make imagettftext() working? My host is using GD 2 or higher with all image types allowed, also freetype libraries and everything allowed. Can't understand why doesn't imagettftext() work for them. I couldn't even find that function from the disabled functions list.

imagestring() is ok all the way, except it does not have font and angle support. My CAPTCHA uses 5 different fonts randomly and have some angle with the characters so I really need this function to work!

Any help? Much appreciated!

Thank you.
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Does using imagettftext() cause an error or a warning, or does it simply do nothing?
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Post by kaisellgren »

PHP seems to just ignore the whole codeline/function. Nothing appears, not even errors when E_ALL. imagestring works fine with same settings and text, but imagettftext doesn't :(
Post Reply