On my shared host, the ImageMagick convert binary (in /usr/bin/convert) returns with status 1 after testing the version. Since it's a nonzero return code I'm unable to set ImageMagick as my toolkit, even though the error string is empty.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | imagemagick-fix-return-status-1-1420276.patch | 799 bytes | klokie |
Comments
Comment #1
klokie commentedHere's a patch which fixes the problem on my host. YMMV.
Comment #2
smitty commentedI have got the same problem on a debian server here.
On opening admin/config/media/image-toolkit I get an error message instead of the version information of Imagemagick: "ImageMagick error -1: No error message.".
But sometimes the version information of ImageMagick appears. But if I want to save the path to the "convert" binary I get the error-message again and can't save the configuration.
I applied this patch and ImageMagick seems to work now.
But I'm a little anxious about the error instead of the version information (wich continues to appear when opening the configuration dialogue). Any ideas what might going on there?
Comment #3
smitty commentedAfter a few days I discovered that nearly every time I opened the image-toolkit dialogue again I got the error message from #2 instead of the version information. And then it was not possible to save the configuration again.
So I had a deeper look into the error-message and noticed that my error-code was not "1" (like in original issue) but "-1". So I changed the patch from #1 and replaced the line
if ($return_code != 0 && !($return_code == 1 && $error === '')) {with
if ($return_code != 0 && !($return_code == -1 && $error === '')) {and now everything runs fine. I never got the error again.
Comment #4
klokie commentedThe patch from #1 worked for me, running Graphicsmagick v.1.3.5-6 on Ubuntu 10.04.
Comment #5
infines commentedComment #6
sunSorry, but we need to get to the bottom of why
convert -versionreturns a non-zero status code (which denotes an error).Comment #7
klokie commentedIt's definitely version-specific:
ssh host1 "convert -version && echo 'ok' || echo 'non-zero status code'"
Version: ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
ok
ssh host2 "convert -version && echo 'ok' || echo 'non-zero status code'"
Version: ImageMagick 6.4.8 2011-02-21 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
non-zero status code
Comment #8
k8e1050 commentedThanks Klokie. I've had my imagemagick version updated to " Version: ImageMagick 6.8.3-7 2013-03-05 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP Modules
Delegates: bzlib mpeg fontconfig freetype jng jpeg png ps tiff xml zlib" I can confirm that both drupal 6 and 7 sites work fine with this
Comment #9
alexander.sibert commentedI have installed ImageMagick 6.7.8-2 and GraphicsMagick 1.3.5 on my Managed Server and receive the Error with correct path to convert or gm
Comment #10
news4u commentedpatch #1 worked for me
Comment #11
ciss commentedSuggesting to close this as Works as Designed, with the recommendation to use ImageMagick 6.5 or above. Any objections?
Comment #12
mondrakeDrupal 7 is EOL