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