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.

Comments

klokie’s picture

StatusFileSize
new799 bytes

Here's a patch which fixes the problem on my host. YMMV.

smitty’s picture

I 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?

smitty’s picture

After 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.

klokie’s picture

The patch from #1 worked for me, running Graphicsmagick v.1.3.5-6 on Ubuntu 10.04.

infines’s picture

Status: Needs review » Reviewed & tested by the community
sun’s picture

Status: Reviewed & tested by the community » Needs review

Sorry, but we need to get to the bottom of why convert -version returns a non-zero status code (which denotes an error).

klokie’s picture

It'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

k8e1050’s picture

Thanks 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

alexander.sibert’s picture

Issue summary: View changes

I 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

User error: ImageMagick error -1: No error message. in _imagemagick_convert_exec() (Line 519 from /html/sites/all/modules/imagemagick/imagemagick.module)

news4u’s picture

Issue tags: +ImageMagic

patch #1 worked for me

ciss’s picture

Suggesting to close this as Works as Designed, with the recommendation to use ImageMagick 6.5 or above. Any objections?

mondrake’s picture

Status: Needs review » Closed (outdated)

Drupal 7 is EOL