Hello,

My Version D7.9

When I try to activate the image captcha module, I get this message.

The Image CAPTCHA module can not be installed because your PHP setup does not provide the GD library, which is required to generate images.

The strange thing is that my provider gives me this information
version 2.3 de la librairie GLIBC installed

Furthermore, I have another site (same provider, same modules versions...) it works nicely !!!

thanks for your help

Files: 
CommentFileSizeAuthor
#4 Screen shot 2011-11-13 at 10.58.44.png165.99 KBsoxofaan

Comments

soxofaan’s picture

Category:bug» feature

Hello,

the check whether the GD library is available is (image_captcha.module around line 163)

<?php
function_exists
('imagejpeg');
?>

can you see whether this returns true or false on your setup?

soxofaan’s picture

Category:feature» support

(sorry wrong category)

pdeclarens’s picture

Hi,

Thanks for your help.

This is what I find at line 163:
if (!function_exists('imagejpeg')) {
$status = $status | IMAGE_CAPTCHA_ERROR_NO_GDLIB;
}

Sorry but I do not know where and how I have to insert the code lines you suggest to test the GD library...

soxofaan’s picture

StatusFileSize
new165.99 KB

The strange thing is that my provider gives me this information
version 2.3 de la librairie GLIBC installed

I misread this apparently the first time: you need the GD library (http://www.php.net/manual/en/book.image.php)
the GLIBC library is something totally different (http://www.gnu.org/s/libc/) .

If you check the status report of you website, you should have entries about the GD library (see attached screenshot)

pdeclarens’s picture

Hello,

Thanks for your help

This is what I find in the report:
OK
Prise en charge du format PNG par la bibliothèque GD bundled (2.0.34 compatible)

Does this help ti find out what is wrong?

rgds

soxofaan’s picture

if you change that line 163 from

<?php
if (!function_exists('imagejpeg')) {
?>

to

<?php
if (!function_exists('imagepng')) {
?>

do things work correctly then?

pdeclarens’s picture

Status:Active» Fixed

hello,

I made the suggested modification and changes the image format to png.

It works !

great many thanks !

soxofaan’s picture

Status:Fixed» Closed (fixed)

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