0

I run a site that lets people upload JPEGS, that are then resized and have a .png watermark applied over the top of them.

As of today, a lot of the uploads are failing.

Uncaught ImagickException: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/501

The weird thing is, some still work fine, complete with the watermark.

I did a yum update the other day, and it installed a new version of ImageMagick and -devel and -last-libs, I'm guessing this broke something. As for the fact that some uploads still work - maybe some of my php-fpm processes are still somehow using the older version?

I'm on CentOS 6.

Can someone point me to a quick fix for this please, my site has hundreds of visitors on it right now, and it's going to hurt me if I can't fix this!

Thanks.

convert -version gives me this:

Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-05-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib freetype jpeg lcms tiff x zlib

(Although I have no idea what it showed before things broke).

These are the packages I currently have installed:

ImageMagick-6.7.2.7-4.el6_7.x86_64
ImageMagick-devel-6.7.2.7-4.el6_7.x86_64
ImageMagick-last-libs-6.9.4.1-1.el6.remi.x86_64
php70-php-pecl-imagick-3.4.2-1.el6.remi.x86_64
Codemonkey
  • 4,455
  • 5
  • 44
  • 76
  • Odd thing is it's not just the png. I commented those lines of code out and then I get an identical error message for "JPEG" instead, even though a jpeg delegate is shown! – Codemonkey May 15 '16 at 20:42
  • Update imagick as well. From the manual "Once compiled, Imagick should be run with the same version of ImageMagick that it was compiled against. Running against a different version of ImageMagick is known to cause stability issues, and so is not recommended or supported." – Danack May 16 '16 at 04:51
  • I've added the currently installed items to the original post. According to yum everything's up to date. – Codemonkey May 16 '16 at 07:41
  • Hardly! Version 6.7 is at least 2+ years old! – Mark Setchell May 16 '16 at 07:55
  • I've `yum downgrade`d ImageMagick-last-libs (6.9.4.1 -> 6.9.3.10) and php70-php-pecl-imagick (3.4.2 -> 3.4.1) and everything seems to be fine now. – Codemonkey May 16 '16 at 09:49

1 Answers1

1

Have you restart the server (apache or fpm) after the upgrade ?

As for each new version, path to the coders change (as the version is part of the path), so the server need to be restarted.

See: https://github.com/remicollet/remirepo/issues/33

Remi Collet
  • 6,198
  • 1
  • 20
  • 25
  • I hadn't. Brilliant, thank you. Since some processes seemed to still be working, I assumed it was the newly-pooled ones that weren't working. The last thing I wanted to do was restart the server and break everything completely! Re-updated and restarted now and everything's fine, thank you! – Codemonkey May 16 '16 at 10:06