From: Boyan B. B. <bbo...@bo...> - 2013-01-20 15:56:38
|
Hi all, I think I found a small issue with CAPTCHA plugin with captcha_php backend using PHP 5.4.x. The issue is that the captcha image does not display on the login page. The error in the apache error log: ----------------------------------------------------------------------------- [Sun Jan 20 16:37:12 2013] [error] [client X.X.X.X] PHP Warning: imagejpeg(): Filename cannot be empty in <SQUIRRELMAIL_HOME_DIR_PATH>/plugins/captcha/backends/captcha_php/captcha.php on line 328 ----------------------------------------------------------------------------- I didn't have the issue with PHP 5.3.x. It seems that the imagejpeg() function behaviour has been changed with PHP 5.4.x. The fix is simple (edit line 328 in <SQUIRRELMAIL_HOME_DIR_PATH>/plugins/captcha/backends/captcha_php/captcha.php): ---------------------------------------------- from: imagejpeg($img, "", (int)$quality); to: imagejpeg($img, NULL, (int)$quality); ---------------------------------------------- Probably this could be fixed in the next version of captch plugin if the author thinks that's an issue. I am not sure if it will work with PHP 5.3.x or lower. Thanks & Best Regards, Boyan Boychev SquirrelMail 1.4.22 PHP Version 5.4.8--pl0-gentoo GD Version bundled (2.0.34 compatible) CAPTCHA 1.2.3 |