Skip to Content Skip to Menu

Bug-Report uddeIM 1.6: Captcha will not be display

  • iconcy.de
  • iconcy.de
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
15 years 7 months ago #91669 by iconcy.de
In some cases the capture does not working (no image is displayed). In my opinion this is a problem with the path to the font file.

This patch will help!

Files:
/var/www/sushi/components/com_uddeim/captcha.php
/var/www/sushi/components/com_uddeim/captcha15.php

Change the code in function CaptchaSecurityImages (pay attention to $thispath):

[code:1]/* create textbox and add text */
if (DIRECTORY_SEPARATOR=='/') {
$thispath = dirname(__FILE__) . '/';
} else {
$thispath = str_replace('\\', '/', dirname(__FILE__) . '/');
}
$textbox = imagettfbbox($font_size, 0, $thispath . $this->font, $code) or die('Error in imagettfbbox function');
...
...
imagettftext($image, $font_size, 0, $x, $y, $text_color, $thispath . $this->font , $code) or die('Error in imagettftext function');[/code:1]

Post edited by: iconcy.de, at: 2009/03/14 11:25

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 7 months ago #91671 by slabbi
Thanks for the patch.

Usually it should work without but its more reliable with the patch.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum