Issues with ImageMagick on Media Temple personal grid

I’m getting strange results in trying to configure ImageMagick (6.7.7-10) on a MediaTemple personal grid server.

MT’s documentation (and support team) says that convert is located at /usr/local/bin. When I use that in settings, Omeka says “The ImageMagick directory path does not work.” Uploading files does work but no derivatives are created. Here’s the error log.

2017-01-03T10:39:58-08:00 WARN (4): Error output from ImageMagick:
sh: /usr/local/bin/convert: No such file or directory

2017-01-03T10:39:58-08:00 ERR (3): ImageMagick failed with status code 127.

If I run which convert via SSH, it returns /usr/bin/convert but when I put that (/usr/bin) in Omeka settings, all file uploads fail. Here’s the error:

2017-01-03T10:50:02-08:00 ERR (3): exception 'Omeka_File_Derivative_Exception' with message 'ImageMagick is not properly configured: invalid directory given for the ImageMagick command!' in /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php:83
Stack trace:
#0 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php(39): Omeka_File_Derivative_Strategy_ExternalImageMagick->_getConvertPath()
#1 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/File/Derivative/Creator.php(76): Omeka_File_Derivative_Strategy_ExternalImageMagick->createImage('/tmp/14770590fe...', '/tmp/fullsize_1...', 'fullsize', 1800, 'image/jpeg')
#2 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/models/File.php(356): Omeka_File_Derivative_Creator->create('/tmp/14770590fe...', '14770590fe0a6f1...', 'image/jpeg')
#3 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/models/Job/FileProcessUpload.php(22): File->createDerivatives()
#4 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/Job/Dispatcher/Adapter/Synchronous.php(25): Job_FileProcessUpload->perform()
#5 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/Job/Dispatcher/Default.php(136): Omeka_Job_Dispatcher_Adapter_Synchronous->send('{"className":"J...', Array)
#6 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/models/File.php(203): Omeka_Job_Dispatcher_Default->send('Job_FileProcess...', Array)
#7 [internal function]: File->afterSave(Array)
#8 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#9 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/Record/AbstractRecord.php(550): Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)
#10 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/models/Item.php(335): Omeka_Record_AbstractRecord->save()
#11 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/models/Builder/Item.php(204): Item->saveFiles()
#12 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/globals.php(567): Builder_Item->addFiles('Upload', 'file', Array)
#13 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/models/Item.php(320): insert_files_for_item(Object(Item), 'Upload', 'file', Array)
#14 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/models/Item.php(230): Item->_uploadFiles()
#15 [internal function]: Item->beforeSave(Array)
#16 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/Record/AbstractRecord.php(277): call_user_func(Array, Array)
#17 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/Record/AbstractRecord.php(531): Omeka_Record_AbstractRecord->runCallbacks('beforeSave', Array)
#18 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/Controller/AbstractActionController.php(229): Omeka_Record_AbstractRecord->save(false)
#19 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/controllers/ItemsController.php(91): Omeka_Controller_AbstractActionController->editAction()
#20 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Zend/Controller/Action.php(516): ItemsController->editAction()
#21 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('editAction')
#22 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#23 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#24 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#25 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#26 /nfs/c12/h07/mnt/218281/domains/oosi.sculpturecenter.org/html/admin/index.php(28): Omeka_Application->run()
#27 {main}

I’ve also added the following to php.ini:

open_basedir = /nfs:/tmp:/usr/local:/etc/apache2/gs-bin:/usr/bin/convert

Has anyone had any luck with Media Temple personal grid and/or have any idea which path is correct or what I might do to fix this? Thanks – E

Turns out the issue was the open_basedir setting in php.ini. Media Temple’s documentation included “/convert” but removing it did the trick.

open_basedir = /nfs:/tmp:/usr/local:/etc/apache2/gs-bin:/usr/bin