Captcha Image is not Displaying
kmillecam — Thu, 28/06/2007 - 23:07
Hi Heine,
I just installed MyCaptcha on a Drupal 5.1 site (server has GD2 installed) but I can't get the captcha images to display.
When I view the source of my comment form, I see this path to the image:
<img src="/mycaptcha/image/f363821e8a19bd3177a15c446b95c6f2" />
I am running the ImageCache module. Could that be conflicting?
Thanks,
Kevin
- Login to post comments
Call to undefined function: imagettfbbox()
kmillecam — Fri, 29/06/2007 - 02:35I checked the image path on this site and noticed it was the same as the path on my site (/mycaptcha/image/...) so that appears to be in order.
Next I checked to see if I could view your image directly at:
http://heine.familiedeelstra.com/mycaptcha/image/46ea4fede1215629286dec9...
That worked.
So I tried to view an image on my site using the same trick:
http://www.webwiseone.com/mycaptcha/image/e81147f8399d05965d3421d8c863fe7d
I got this error:
Fatal error: Call to undefined function: imagettfbbox() in /home/webwis2/public_html/sites/all/modules/contrib/mycap/mycap.module on line 650
I'll keep digging.
FreeType library
kmillecam — Fri, 29/06/2007 - 05:12I did some Googling and found that imagettfbbox() is a PHP function that requires both the GD library and the FreeType library.
I installed the missing FreeType library and now get a tinted block where the image should be.
See: http://www.webwiseone.com/user/register
I'll keep digging.
Thank you for debugging
Heine — Fri, 29/06/2007 - 06:50Thank you for debugging this.
I'll add the FreeType requirement to the requirements and add an error message to the next release.
- Is the path to the font correct?
- Can you try to clear the cache_captcha table?
[Resolved] Fonts Upload
kmillecam — Fri, 29/06/2007 - 14:05Based on your suggestion to check the fonts path, I started to examine the fonts files themselves. It appears they were uploaded (by me) in ASCII mode which introduced corruption and made them unusable.
After deleting the corrupt font files and uploading new ones (in binary mode) everything is working as advertised.
Thanks for a great module Heine!