Omeka_Storage_Exception on shared host

I have a Omeka_Storage_Exception on a shared host when I want to add a mp3 or mp4 file to an item. Adding larger images or pdf work just fine.

I read that it has to do with imagemagick not being able to convert to thumbnails, as one explanation. Anybody had this? Solved this?


Here is the stack trace:

exception 'Omeka_Storage_Exception' with message 'Unable to store file.' in /home/designfi/www/<br />
Stack trace:<br />
#0 [internal function]: Omeka_Storage_Adapter_Filesystem->store('/tmp//fullsize_...', 'fullsize/67c58c...')<br />
#1 /home/designfi/www/ call_user_func_array(Array, Array)<br />
#2 /home/designfi/www/ Omeka_Storage->__call('store', Array)<br />
#3 /home/designfi/www/ Omeka_Storage->store('/tmp//fullsize_...', 'fullsize/67c58c...')<br />
#4 /home/designfi/www/ File->storeFiles()<br />
#5 /home/designfi/www/ Job_FileProcessUpload->perform()<br />
#6 /home/designfi/www/ Omeka_Job_Dispatcher_Adapter_Synchronous->send('{"className":"J...', Array)<br />
#7 /home/designfi/www/ Omeka_Job_Dispatcher_Default->send('Job_FileProcess...', Array)<br />
#8 [internal function]: File->afterSave(Array)<br />
#9 /home/designfi/www/ call_user_func(Array, Array)<br />
#10 /home/designfi/www/ Omeka_Record_AbstractRecord->runCallbacks('afterSave', Array)<br />
#11 /home/designfi/www/ Omeka_Record_AbstractRecord->save()<br />
#12 /home/designfi/www/ Item->saveFiles()<br />
#13 /home/designfi/www/ Builder_Item->addFiles('Upload', 'file', Array)<br />
#14 /home/designfi/www/ insert_files_for_item(Object(Item), 'Upload', 'file', Array)<br />
#15 /home/designfi/www/ Item->_uploadFiles()<br />
#16 [internal function]: Item->beforeSave(Array)<br />
#17 /home/designfi/www/ call_user_func(Array, Array)<br />
#18 /home/designfi/www/ Omeka_Record_AbstractRecord->runCallbacks('beforeSave', Array)<br />
#19 /home/designfi/www/ Omeka_Record_AbstractRecord->save(false)<br />
#20 /home/designfi/www/ Omeka_Controller_AbstractActionController->editAction()<br />
#21 /home/designfi/www/ ItemsController->editAction()<br />
#22 /home/designfi/www/ Zend_Controller_Action->dispatch('editAction')<br />
#23 /home/designfi/www/ Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))<br />
#24 /home/designfi/www/ Zend_Controller_Front->dispatch()<br />
#25 /home/designfi/www/ Zend_Application_Bootstrap_Bootstrap->run()<br />
#26 /home/designfi/www/ Zend_Application->run()<br />
#27 /home/designfi/www/ Omeka_Application->run()<br />
#28 {main}

I can't say that I've seen this combo. My first guess would have been permissions on the directories, but since you are successful with other, larger file types, that seems to rule out that guess.

Another guess is that those file types aren't allowed under Omeka's Security settings. I would have expected a different error, but maybe there's a new twist at work. You could try disabling file validation there, and see if it makes a difference.

Deep down, it looks like the issue is that the PHP rename function fails silently when trying to move the file to Omeka's storage system. Beyond that, it's hard to see what's happening. The server logs might indicate more than Omeka's logs do. Depending on how the hosting company has set things up, they might be able to point you to where to find those, or indicate something that they see.

Hello Patrick

Thank you very much for the extensive answer. Unfortunately I have mere ftp access. But we hopefully move to a host where I am in complete control.

I disabled the file validation, as you suggested. Unfortunately the error persists. I tend to think it has to do with image magick. So far, no success. And since I'm locked to ftp only there is only so far I can do.

Thanks again :)

If you can ask your hosting company what version of imagemagick they are using, that might help. It's possible that it's a version that doesn't do well with those file types, which would indeed explain the issue. Newer versions should be okay, so that's another route to investigate.

Hello Patrick

I managed to resolve the problem. I followed to link by mebrett here.

the fileDerivatives.strategy = "Omeka_File_Derivative_Strategy_Imagick" did it for me. The GD also worked fine, except for handling less fileformats - ie no preview for pdfs.

Thanks for your support! You got a address?