[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 82: imagettftext() [function.imagettftext]: any2eucjp(): invalid code in input string
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 82: imagettftext() [function.imagettftext]: any2eucjp(): invalid code in input string
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 82: imagettftext() [function.imagettftext]: any2eucjp(): invalid code in input string
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 121: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2946)
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 122: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2946)
This seems to be charset-related. If I do following change to narrow down the created characters, the captcha starts to work.
- Code: Select all
--- captcha_gd.php 2006-11-28 07:55:33.000000000 +0100
+++ captcha_gd.php.w 2006-11-17 20:12:53.000000000 +0100
@@ -78,7 +78,7 @@
$x = mt_rand(0, 360);
$y = mt_rand(0, (int)($this->height - ($size / 5)));
$color = $func2($image, mt_rand(160, 224), mt_rand(160, 224), mt_rand(160, 224));
- $text = chr(mt_rand(45, 250));
+ $text = chr(mt_rand(45, 127));
imagettftext($image, $size, $angle, $x, $y, $color, $this->get_font(), $text);
}
}