I am getting problem while uploading files in "Item". When I upload word file or *.ico file it gets uploaded and appears as link on both Admin and Public site.
But when I try uploading *.jpg file it gives me error "Imagemagick not properly configured.invalid directory given for the ImageMagick command!"
Also when I test, Imagemagick Path in settings, it fails. I checked path with my webhost it says /usr/local/bin/. But it still fails.
When I looked on server under archive folder, In files folder, uploaded file *.jpg was present but none of the other subdirectories (like thumbnails)had that image.
It means it is not converting the images. Please tell me the solution.
First, make sure your imagemagick binary exists. On the server run the following:
You might also see if you can find the imagemagick binary yourself by running:
Finally, when you put the path in the setting:
Make sure you only put in the directory path. So if the path to ImageMagick excutable is /usr/local/bin/convert, then the Imagemagick Directory Path is /usr/local/bin
Let me know if this helps.
How can I run this script on server from webHost?
I have hosted omeka website on web host Verve Hosting.
I submitted support ticket and they confirmed me that the path to Imagemagick is /usr/local/bin/
I placed the request to my webhost for checking Imagemagick binary.
Below is the reply I got:
ImageMagick is located at /usr/bin/convert
root@michigan [~]# which convert
root@michigan [~]# /usr/bin/convert --version
Version: ImageMagick 6.2.6 04/19/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
Can you please let me know, how to proceed in this case?
It looks like they gave you 2 different answers for where the binary is located. You can try changing your 'Path to Convert' setting to '/usr/bin'. If that doesn't work, then something else would be wrong, but hopefully you would see a different error message at that point. good luck!
I already checked about this with my webhost.
I changed the path to '/usr/bin' but it still fails in general settings. It is still giving the same error on screen, "Imagemagick not properly configured..". In error.log, there is no listed error.
Please suggest me what to do.
Below is the query which I placed them:
> New Client Reply: Getting conversion problem with Imagemagick
> Can you please tell me the exact path to Imagemagick directory is "/usr/bin/" or "/usr/local/bin/"?
> Reason being in reply to ticket QMZ-619411, you replied a path which included local. But for reply this ticket I recieved path which doesn't include 'local'.
That's the exact path. The previous reply was for a different server.
Your website is on the michigan server, that's the ImageMagick path for
I wonder if your webhost allows the ImageMagick executable to be executed from within php.
If you are handy with PHP, you could try debugging the issue. The relevant Omeka code is at:
I tried to Debug application/libraries/Omeka/File/Derivative/Image.php
I found that Problem is in below function _getPathToImageMagick()
In this function value for $rawpath is coming "/usr/bin". But I am not getting any values for $cleanpath, realpath($rawPath) and is_dir($cleanPath).
Since we are not getting any values or getting empty values, it can't check
if (($cleanPath = realpath($rawPath)) && is_dir($cleanPath))
And enters the else part and throws an exception.
I tried to get the values of these by replacing throw statement by
throw new Omeka_File_Derivative_Exception('ImageMagick is not properly configured: invalid directory given for the ImageMagick command!.realpath($rawPath)'.realpath($rawPath).'$cleanPath'.$cleanPath.'is_dir($cleanPath)'.is_dir($cleanPath));
Please suggest me what to do in this case.
I tried simply realpath('/usr/bin') in dummy testfile at root level. It gave me below warning:
realpath() [function.realpath]: open_basedir restriction in effect. File(/usr/bin) is not within the allowed path(s):...
Please suggest me what to do in this case.
It looks like your webhost is blocking php access to files in this directory with their open_basedir setting.
Finally my Omeka website started working and now I can upload jpeg images. I am also getting the image results in other folders of archive after conversion.
I placed the support ticket to my webshost and got the below reply:
I removed the open_basedir restriction, try your script now.
Thanks a lot for all your help.
I'm using Godaddy to host Omeka but thumbnails are not working either. I'm not a techie, but here's what they said:
The convert path to ImageMagick, version 5 on our servers is:
The convert path to ImageMagick, version 6 on our servers is:
How can I get Imagemagick to work?