ImageMagick path configuration

Hello,

I've successfully installed Omeka 2.2.2 on my Linux-based hosting service (aruba.it) and it works great except for the image management.

So, the overall current status is the following:
- I've assigned chmod 777 to "files" and all its sub-folders;
- if I configure the ImageMagick directory path with a wrong path (example: /usr/local/bin), the test function returns "The ImageMagick directory path does not work". But...
- If I configure the correct ImageMagick path (/usr/bin/), both the test function and the actual upload of an image return "Omeka has encountered an error" (note that, even after uncommenting the line "SetEnv APPLICATION_ENV development" in .htaccess, no error detail is returned).

Since I've been positively impressed by Omeka during my preliminary tests, I would like to run my project using this CMS but I definitely need to have the image management working properly. Please let me know if I have to modify some piece of code in the application files.

If the .htaccess isn't working for you to enable errors, you should be able to turn them on by editing the bootstrap.php and adding this line, immediately after the <?php line that opens the file:

define('APPLICATION_ENV', 'development');

Hi John,

thanks for the reply. Unfortunately your proposal does not work, and I still get the generic message "Omeka has encountered an error".

I've also tried to set to 'true' debug.exceptions in config.ini, but still result.

Thanks again for your help

That's very odd, when set in the bootstrap file, there shouldn't be any way that the errors don't get displayed.

Try enabling error logging instead; the instructions are on the same page as the ones for enabling error display.

Ok, at least now I was able to log what's happening. Here's the log (just replaced the actual domain with a placeholder domain in the log).

Thanks.

2014-09-15T22:27:15+02:00 ERR (3): exception 'Omeka_File_Derivative_Exception' with message 'Failed to execute command: /usr/bin/convert -version.' in /web/htdocs/www.myproject.com/application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php:201
Stack trace:
#0 /web/htdocs/www.myproject.com/application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php(154): Omeka_File_Derivative_Strategy_ExternalImageMagick::executeCommand('/usr/bin/conver...', NULL, NULL, NULL)
#1 /web/htdocs/www.myproject.com/application/controllers/SettingsController.php(196): Omeka_File_Derivative_Strategy_ExternalImageMagick::isValidImageMagickPath('/usr/bin/')
#2 /web/htdocs/www.myproject.com/application/libraries/Zend/Controller/Action.php(516): SettingsController->checkImagemagickAction()
#3 /web/htdocs/www.myproject.com/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('checkImagemagic...')
#4 /web/htdocs/www.myproject.com/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#5 /web/htdocs/www.myproject.com/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(103): Zend_Controller_Front->dispatch()
#6 /web/htdocs/www.myproject.com/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#7 /web/htdocs/www.myproject.com/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#8 /web/htdocs/www.myproject.com/admin/index.php(28): Omeka_Application->run()
#9 {main}

Is this a server you control, or a shared host?

You could have a problem like this if your server's PHP install has proc_open disabled. proc_open is the function Omeka uses to run the ImageMagick command.

You are right: the server is a shared host, and they disable for security reasons "proc_open".
Since I have no chance to modify this setting, is there any workaround here at Omeka side?
Thanks

If your server has or will install the PHP "Imagick" extension, Omeka can be configured to use that instead, which doesn't require proc_open.

John, I have posted elsewhere in this forum a thread about an issue I am having with ImageMagick but imagine an answer may be at hand here. You write: If your server has or will install the PHP "Imagick" extension, Omeka can be configured to use that instead, which doesn't require proc_open."

Is this configuration something one does on the Omeka side of things or does one need to ask the shared host for the server to make an alteration to a configuration file?

Thanks in advance for your counsel.

Just to be clear, the PHP Imagick extension is installed, so it is the configuration after that fact that is stumping me.

If you have Imagick installed, you can configure Omeka to use that in the application/config/config.ini:

fileDerivatives.strategy = "Omeka_File_Derivative_Strategy_Imagick"

This only works in Omeka 2.2 or newer.

John, many, many thanks for your precise guidance. I feel as if I am "almost there," being able now to upload the full-blown image but without thumbnail creation, an obvious problem when it comes to the manipulation of the database as SimplePages, Neatline Exhibits and whatnot. MASerra noted a quite similar problem about a year ago ( http://omeka.org/forums/topic/imagemagick-is-not-properly-configured ), and I wonder if his odyssey still is the path to follow or if a simpler, time-saving resolution is at hand with 2.2.2?

Many thanks in advance.

All best
Quint Gregory

Have you turned on error logging (through application/config/config.ini) for Omeka and checked the log?

When Omeka tries and fails to make a thumbnail for something, it should log a message noting the failure that may help illuminate what the problem is.

If you have the Imagick extension installed, the conversions should be working, but it's possible to have ImageMagick (and Imagick) built with a whole range of formats enabled or disabled. It's possible that your server's ImageMagick simply isn't able to read the types of files you're uploading (or able to write to JPEG, but that's a rarer situation).