Hi,
I enabled the captcha and image captcha modules. and when i go to captcha administration page i saw the drop down to select the type of captcha wanted to use,

but under that dropdown , i can only see 'math captcha' and i can't see image captcha as an option there.

also when i go to imagecaptcha example, - that is showing up, and it says the error, my php is not support true type font,

anybody know how to enable true type font for php.

sarath

Comments

tommeir’s picture

Version: 6.x-2.0 » 6.x-2.1

confirmed, image Captcha not in selection list (Default challenge type and Challenge type).
Tried to upgrade from 2.0 to 2.1 - same problem.

imclean’s picture

I'm also seeing this behaviour. With no TTF support the option to select Image CAPTCHA isn't available. Apparently this is known: http://drupal.org/node/384814#comment-1403112

The problem seems be that when checking if Image CAPTCHA is available, the module only checks to see if everything is ok, not whether the only problem is lack off TTF support. I'm not sure why it's done like this because TTF fonts are not required for Image CAPTCHA support.

To get around it, I've replaced line 177 of image_captcha/image_captcha.module with the following 2 lines (so _image_captcha_check_setup() isn't called twice):

      $image_captcha_check_setup = _image_captcha_check_setup();
      if (($image_captcha_check_setup == IMAGE_CAPTCHA_SETUP_OK) || ($image_captcha_check_setup == IMAGE_CAPTCHA_ERROR_NO_TTF_SUPPORT)) {
cj11363’s picture

I have the same problem with 2.1 on my OS X 10.6 machine, and the code suggested by imclean appears to have solved it. Thanks!

--cj

soxofaan’s picture

Status: Active » Needs review
StatusFileSize
new4.04 KB

the fix from #2 should indeed work

Here is a more radical solution:
I removed the IMAGE_CAPTCHA_SETUP_OK constant, because it is confusing: even when there is no TTF support ('IMAGE_CAPTCHA_ERROR_NO_TTF_SUPPORT' = 1 != IMAGE_CAPTCHA_SETUP_OK = 0), the setup is still ok (however not recommended).

The patch also contains some other minor tweaks and related documentation additions.

Status: Needs review » Needs work

The last submitted patch, 668152_unambiguous_setup_checking_01.patch, failed testing.

soxofaan’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 668152_unambiguous_setup_checking_01.patch, failed testing.

soxofaan’s picture

Status: Needs work » Needs review
soxofaan’s picture

Version: 6.x-2.1 » 6.x-2.x-dev

changing branch for testbot

Status: Needs review » Needs work

The last submitted patch, 668152_unambiguous_setup_checking_01.patch, failed testing.

soxofaan’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.