Just noticed this comment by kenbarnettpt on http://drupal.org/node/151584:

I'm running Drupal v6.13 on PHP v5.2.9 and MySQL v5.0.84 (Apache v2.2.1.11 on Unix) with the CAPTCHA module v6.x-2.0-rc3. I built PHP from source with "--with-gd" and have the libpng and libjpeg libraries installed. When I run the Drupal Status report, under the GD LIBRARY item it shows a green check mark and indicates "bundled (2.0.34 compatible)". However, when I go to Administer/User Management/CAPTCHA/Image CAPTCHA, I receive the message "The Image CAPTCHA module can not generate images because your PHP setup does not support it (no GD Library)." Any ideas? Thanks!

Ken

Comments

soxofaan’s picture

Status: Active » Postponed (maintainer needs more info)

The check for the GD library is in image_captcha.module around line 111:

function _image_captcha_check_setup() {
  // Check GD library and is TTF support.
  if (!function_exists('imagejpeg')) {
    return IMAGE_CAPTCHA_ERROR_NO_GDLIB;
  }
...

Can you check if this function "imagejpeg" exists on your setup?
And does "imagepng" exists?

kenbarnettpt’s picture

My bad. I had compiled PHP without explicit JPEG or FreeType support (I did have PNG support and native GD TTF support.) Once I recompiled PHP with --with-jpeg-dir=... --with-freetype-dir=..., all was golden. Might be worth updating the documentation to show these requirements? Thanks for the assist!

Ken

soxofaan’s picture

Status: Postponed (maintainer needs more info) » Fixed

I updated the error message to make it more clear that both GD and JPEG support are required:
http://drupal.org/cvs?commit=264224

Status: Fixed » Closed (fixed)

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