Captcha not working on CentOS 7 after ImageMagick upgrade
We have an issue in CentOS with latest GD::Image and ImageMagick modules, the captcha size is always one character:
[root@kptn-centos7 ~]# rpm -qa | grep -i magic
ImageMagick-6.7.8.9-18.el7.x86_64
perl-Variable-Magic-0.54-2.el7.x86_64
ImageMagick-perl-6.7.8.9-18.el7.x86_64
I don't have this issue on Ubuntu, with these versions:
root@llng-site:~# dpkg -l | grep -i magick
ii imagemagick-6-common 8:6.9.7.4+dfsg-11+deb9u7 all image manipulation programs -- infrastructure
ii libimage-magick-perl 8:6.9.7.4+dfsg-11+deb9u7 all Perl interface to the ImageMagick graphics routines
ii libimage-magick-q16-perl 8:6.9.7.4+dfsg-11+deb9u7 amd64 Perl interface to the ImageMagick graphics routines -- Q16 version
ii libmagickcore-6.q16-3:amd64 8:6.9.7.4+dfsg-11+deb9u7 amd64 low-level image manipulation library -- quantum depth Q16
ii libmagickwand-6.q16-3:amd64 8:6.9.7.4+dfsg-11+deb9u7 amd64 image manipulation library -- quantum depth Q16
ii php-imagick
A workaround is to disable ImageMagick for Captcha :
diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm
index c4ee4ee1b..5304528b8 100644
--- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm
+++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Captcha.pm
@@ -1,7 +1,7 @@
package Lemonldap::NG::Portal::Lib::Captcha;
use strict;
-use GD::SecurityImage use_magick => 1;
+use GD::SecurityImage use_magick => 0;
use Mouse;
use MIME::Base64;
But the result is not as good as with ImageMagick.