Hello,
Could you help me to sort out one of the problem, is when I try to use "imagecaptcha" by PHP 5 it does not show any captcha images, only working if I'm using PHP4.

CommentFileSizeAuthor
#8 shot00349.jpg37.08 KBPaV@drupal.ru

Comments

soxofaan’s picture

Category: bug » support
Priority: Critical » Normal

what happens if you request the image URL directly (right click on the alt text and choose something like "open image" or "view image", depending on your browser)?

Are there any related messages at Administer > Reports > Recent log entries ?

PaV@drupal.ru’s picture

View image -> blank page

Recent log don't have related entries

soxofaan’s picture

Can you try with different browsers?
And if you are familiar with the "wget" tool (Linux, OS X): what's its feedback when requesting an image?

PaV@drupal.ru’s picture

ff3 - alt text (blank page)
ie6 - image with red cross
all this unworked if in my hosting's control panel selected method "php assigned by PHP 5"
else "php assigned by PHP 4" all works!

soxofaan’s picture

is that on a live site? can you provide the URL?
(if you don't want to post the link in the open, send it through my contact page at http://drupal.org/user/41478/contact)

PaV@drupal.ru’s picture

jes
http://www.ural-sib.org/
pull "refresh page" until apperas Image captcha on login form

soxofaan’s picture

there is something wrong with the URL of the CAPTCHA images on your site

on your site, the URLs are like image_captcha/%252F1237759178
while with CAPTCHA 6.x-2.x, the URLs should be like image_captcha/23432/1237759178.

This is the code that generates the image URL (image_captcha.module line 156):

        // Generate image source URL (add timestamp to avoid problems with
        // client side caching: subsequent images of the same CAPTCHA session
        // have the same URL, but should display a different code).
        $img_src = check_url(url("image_captcha/$captcha_sid/". time()));

Any idea why this does not work on your PHP5 setup?
it works fine on my PHP 5.2.5 setup.

PaV@drupal.ru’s picture

StatusFileSize
new37.08 KB

hmm....
ff3

soxofaan’s picture

that's weird I get the following kind of stuff
< img src="/eo/image_captcha/%252F1237803895" alt="Image CAPTCHA" title="Image CAPTCHA" / >
(firefox 3, both on linux and mac)

pavlowsk’s picture

Hi, soxofaan!
I'm admin of the server where is locating http://www.ural-sib.org/.
My customer have a great problem with the captcha, the captcha doesnt show any information then we are using php 5.x.x., but it's working fine with php 4, I'm no idea whats going on, and also did check configuration of php 5, everything is fine, but captcha still doesnt work :(
May be you've got any ideat to sort it out, please?

THA

Sergey

soxofaan’s picture

what's the precise version of PHP?

Can you try if CAPTCHA 6.x-1.0-rc2 works? (you'll have to uninstall CAPTCHA 6.x-2.0-beta2 first)

PaV@drupal.ru’s picture

soxofaan, both version (6.x-1.0-rc2,6.x-2.0-beta2) worked if selected built-in font :(

soxofaan’s picture

So the problem lies in the TTF support of your PHP setup.
can you check if your version of PHP5 supports TTF (a phpinfo page should contain some references to "ttf")

PaV@drupal.ru’s picture

Category: support » feature

soxofaan, it's work, thanks
You can adding check (ttf-works) in the module on the future?

pavlowsk’s picture

soxofaan,
Hi,
Everything is working now, thanks for sort it out. I even did't know that php5 does't support ttf by default.
Cheers mate!!!!

THA

With my best regards, Sergey

soxofaan’s picture

Title: Image captcha doesn't display the CAPTCHA image, instead displays alt text from corresponding img tag » provide better checking of PHP's TTF support
Priority: Normal » Minor

You can adding check (ttf-works) in the module on the future?

There is such functionality in the module already:
If there is no TTF support, you can't select the image CAPTCHA challenge from the UI.

But as far as I understand: you first configured the CAPTCHA settings under PHP with TTF support and then switched to PHP without TTF support. This is of course a bit of an exotic use case.

soxofaan’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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