ImageMagick has stopped working consistently

I’m encountering intermittent errors when uploading images. When I try to upload images, about 90% of the time it’s giving me what I presume to be the standard ImageMagick error (see below), and when I run the ImageMagick path test, it fails. This has impacted new installs as well as older ones that have been working for 1.5+ years. I’ve contacted the sysadmin about this, and they have said nothing has changed.

Are there any common issues (either with Omeka or with the server) that could cause this? Is there any further information I could relay to the sysadmin to help with this?

When you upload an image:

Omeka_File_Derivative_Exception
Failed to execute command: /usr/bin/convert '/tmp/c338e7a20b1447f61530281e03c52742.jpg[0]' -background white +repage -flatten -thumbnail '800x800>' '/tmp/fullsize_c338e7a20b1447f61530281e03c52742.jpg'.

exception 'Omeka_File_Derivative_Exception' with message 'Failed to execute command: /usr/bin/convert '/tmp/c338e7a20b1447f61530281e03c52742.jpg[0]' -background white +repage -flatten -thumbnail '800x800>' '/tmp/fullsize_c338e7a20b1447f61530281e03c52742.jpg'.' in /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php:212
Stack trace:
#0 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php(49): Omeka_File_Derivative_Strategy_ExternalImageMagick::executeCommand('/usr/bin/conver...', NULL, NULL, NULL)
#1 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/File/Derivative/Creator.php(76): Omeka_File_Derivative_Strategy_ExternalImageMagick->createImage('/tmp/c338e7a20b...', '/tmp/fullsize_c...', 'fullsize', 800, 'image/jpeg')
#2 /matrix/www/leadr/projects/neatlinedemo499/application/models/File.php(356): Omeka_File_Derivative_Creator->create('/tmp/c338e7a20b...', 'c338e7a20b1447f...', 'image/jpeg')
#3 /matrix/www/leadr/projects/neatlinedemo499/application/models/Job/FileProcessUpload.php(22): File->createDerivatives()
#4 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/Job/Dispatcher/Adapter/Synchronous.php(25): Job_FileProcessUpload->perform()
#5 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/Job/Dispatcher/Default.php(136): Omeka_Job_Dispatcher_Adapter_Synchronous->send('{"className":"J...', Array)
#6 /matrix/www/leadr/projects/neatlinedemo499/application/models/File.php(203): Omeka_Job_Dispatcher_Default->send('Job_FileProcess...', Array)
#7 [internal function]: File->afterSave(Array)
#8 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#9 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)
#10 /matrix/www/leadr/projects/neatlinedemo499/application/models/Item.php(335): Omeka_Record_AbstractRecord->save()
#11 /matrix/www/leadr/projects/neatlinedemo499/application/models/Item.php(248): Item->saveFiles()
#12 [internal function]: Item->afterSave(Array)
#13 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#14 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)
#15 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/Controller/AbstractActionController.php(188): Omeka_Record_AbstractRecord->save(false)
#16 /matrix/www/leadr/projects/neatlinedemo499/application/controllers/ItemsController.php(151): Omeka_Controller_AbstractActionController->addAction()
#17 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Zend/Controller/Action.php(516): ItemsController->addAction()
#18 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('addAction')
#19 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#20 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#21 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#22 /matrix/www/leadr/projects/neatlinedemo499/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#23 /matrix/www/leadr/projects/neatlinedemo499/admin/index.php(28): Omeka_Application->run()
#24 {main}

If even the path test is failing, it’s likely one of a couple problems:

  • ImageMagick has been removed or moved on the server
  • The PHP configuration has been changed so that we can’t run the command (for example, if the function we use to execute the command has been disabled)

It seems likely that something has changed since it’s affecting both old and new installs.