I'm getting these errors. I looked them up, but the patches don't seem to make a difference.

    ImageMagick reported an error: sh: /usr/local/bin/: is a directory.
    Unable to create scaled Thumbnail image.
   The selected file /home/content/xx/xxxxxxxx/html could not be copied.
   warning: Invalid argument supplied for foreach() in /home/content/xx/xxxxxx/html/modules/filefield_paths/modules/image.inc on line 58.

Also when disabling Imagemagick and the Imagemagick module to just use GD2 I still get:

ImageMagick reported an error: sh: /usr/local/bin/: is a directory.

This is for using images with Image Attach Module.

Image cache works fine for cck fields and views, I think because its using GD2.

Kinda lost.

Using Image and Image attach 6.x-1.x-dev.

Is there a way to "turn off" Imagemagick somehow and just use GD2 for all images?

Comments

VM’s picture

Title: Imagemagick Doesn't work numerous errors » Imagemagick Library Issue
Status: Active » Needs work

The imagemagick issue looks like a problem within the environment. Perhaps imagemagick isn't compiled properly.

The invalid argument is being thrown by filefield_paths.module. Perhaps because of the imagemagick binary issue. Perhaps uninstalling and reinstalling imagemagick binaries in your environment will aid. Otherwise, please state which version of the Imagemagick is in use.

There may also be a permissions issue based on the part of the error that states the file can't be copied

Also of note, and worth checking into, I don't believe you should be using both GD and Imagemagick (if you are?). Perhaps they both shouldn't be enabled at the same time (If they are?). Use one or the other. My assumption that you you're install has both enabled at the same times comes from the wording in your original post "when disabling Imagemagick and the Imagemagick module to just use GD2" & later you stated "and just use GD2 for all images." I take this to mean you have both enabled at the same time?

If the above information aids in correcting your issue please mark this issue as fixed.

mattwmc’s picture

Thanks for the reply.

"The imagemagick issue looks like a problem within the environment. Perhaps imagemagick isn't compiled properly."

That could be it. I use godaddy grid hosting, so I don't have access to their Image Magick - just the path.

I've read that others have had problems getting Imagemagick to work on their new grid hosting, as well.

However, as I stated, I would just like to use GD2 - but can't seem to get rid of Imagemagick.

Even when I disable the Imagemagick module, GD2 still doesn't work for Image Attach and I get the Imagemagick related error.

Is there a way to modify a file or image module to disable Imagemagick?

Imagemagick:



    * ImageMagick command: /usr/local/bin/convert -version
    * ImageMagick output: Version: ImageMagick 6.2.8 02/25/09 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

VM’s picture

imageattach is part of the image.module I believe. That said, when you installed image.module you may have set it up to use imagemagick as well. You would have to work through all settings for imageapi and image.module. GD is the default imagekit, it's bundled with PHP.

mattwmc’s picture

All the settings look correct.

I noticed on the front page of the image api module it says:

"Multiple Image ToolKits can be used simultaneously. However, the image toolkit and image is opened with is the only toolkit it can be processed with."

Seems, for some reason, its stuck using Imagemagick - even with it turned off and disabled.

VM’s picture

no idea. Doesn't really make sense since Drupal doesn't use imagemagick without contrib intervention.

What I can say at this point is that I can't reproduce your issue. When imageapi is not enabled GD is used. When imagemagick is enabled and set up imagemagick is used, and when GD2 is set up for imageapi GD2 is used. When imagemagick module is disabled no error.

perhaps it would aid to mention which version of PHP is in use?

mattwmc’s picture

PHP Version 5.2.17

Here are some screen shots to show that Imagemagick is not enabled and still getting an error:

http://bit.ly/gjOWGv

http://bit.ly/hw06df

http://bit.ly/fKIot0

*Added - I uninstalled Image module and still get the same error.

What happens if I uninstall Image API? Will I lose all images on site?

**Added - I ran phpinfo() and don't see Imagemagick listed. Is it supposed to be?

mattwmc’s picture

Just uninstalled Image Api and installed 6.19.

Seems to be stuck somewhere that its looking/using for Imagemagick.

Frustrating.

VM’s picture

Status: Needs work » Active

I assume you mean you installed 6.x-1.9 of imageapi on top of the -dev version. If you were using -dev and rolling backwards, that doesn't usually work without a complete uninstall. Specifically in the case where -dev's DB structure was changed.

I'd set up a vanilla site in the environment. If a fresh install of drupal. I'd then test without using imagemagick. If the error persists, it's likley environmental. If the error doesn't then it's something in your install.

If the error is not persistent, I'd copy the site to a dev environment that mimics your hosting environment and begin working backwards.

Most importantly, if you are doing any of this in your production environment thats typically a problem. Issues should be worked on away from the production environment so as not to make anything worse.

Starting from the beginning:
of note, you mention that image_attach module. This module comes bundled with the image.module which per it's readme.txt had you move an imagemagick.inc file into your drupal includes folder. Was this step taken, and then reversed when you decided to try just GD2?

Based on my experience when imageapi.module and image.module are both used, there are two places to deal with imagetoolkits. Drupal's default admin area and imageapi's. Ensure you've checked both areas of settings if image.module is indeed involved per the usage of image_attach and if the image.module imagemagick file was put in the /includes/ folder or drupal remove it and test.

I don't have the image.module installed and this very well could be why I cannot reproduce your issue.

mattwmc’s picture

I'll give it a go on a fresh install in a sub folder and see what's going on.

I'll report back.