I'd like to share the solution to a problem I had with the Image module (Using drupal 4.7.1)

After you install the Image module it seems you have to copy the file image.imagemagick.inc from the "modules/image" directory to "includes/". This allows the Image module to work, but you may not have the thumbnails generated. You get this error after previewing or submiting a new image:

* Unable to create thumbnail image
* Unable to create preview image

Then you must make sure that in "includes/image.imagemagick.inc" you have the right route to "convert". The default is "/usr/bin/convert" but check your actual configuration, mine was "/usr/local/bin/convert" (you might want to urn "which convert" on the terminal).

You have to change the route to "convert" in two different places in the file "includes/image.imagemagick.inc".

That made my Image module work.

Comments

urbanfalcon’s picture

The convert path was originally an admin'able feature. I don't know why it isn't anymore. More here: http://drupal.org/node/51467

sas789’s picture

Doesn't work for me. Still searching for a solution...

L. Allen Poole’s picture

Thanks for posting your solution... when I installed ImageMagick (on my 1and1.com account), drupal didn't immediately recognize it. I verified that I can execute convert from the command line, and then replaced '/usr/bin/convert' as you suggested with my install path:
'/kunden/homepages/2/d98664611/htdocs/ImageMagick/bin/convert'

Oddly, admin/settings now recognizes the presence of ImageMagick:
'Image handling
Select an image processing toolkit:
ImageMagick Toolkit.
Built-in GD2 toolkit
Location of the "convert" binary:
/kunden/homepages/2/d98664611/htdocs/ImageMagick/bin/convert'

yet it returns an error at the top of the page:
'/kunden/homepages/2/d98664611/htdocs/ImageMagick/bin/convert does not exist or is not executable.'

I don't know why, since the file is there and permissions are 755:
'u36172936:~/ImageMagick/bin > ls -l

-rwxr-xr-x 1 u3617293 ftpusers 53676 Aug 11 01:46 convert'

I'm able to save the admin/settings anyway, but—predictably—jpeg upload with image.module still doesn't work.

Suggestions, please?

darren oh’s picture

I ran into this same problem. It appears that my hosting provider has restricted PHP access to a few specific directories. This is what I found in the log:

Settings page:

file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/darrenoh/convert) is not within the allowed path(s): (/home/darrenoh/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/darrenoh/public_html/includes/image.imagemagick.inc on line 69.

Adding an image:

file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/bin/convert) is not within the allowed path(s): (/home/darrenoh/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/darrenoh/public_html/includes/image.imagemagick.inc on line 69.

This error was generated even when I used a symbolic link to /usr/bin/convert in my home directory. There is nothing we can do if hosting providers are unwilling to allow PHP access to ImageMagick.

L. Allen Poole’s picture

We had to recompile ImageMagick a little differently:
http://drupal.org/node/73986#comment-129412

Thanks for the tip!