Forums » zend file transfer exception

RSS feed for this topic

Info

Tags

No tags yet.

  1. When trying to upload my first document to Omeka, I get a file transfer exception with the following info. I'm wondering if this is related to the fact that a) I installed Omeka on a subdirectory of my main site, which uses Wordpress (i.e. mydomain.net/omeka) or perhaps b) that I got a warning that I don't have a "fileinfo" module loaded into PHP. Not sure where to go from here.

    exception 'Zend_File_Transfer_Exception' with message 'The given destination is not a directory or does not exist' in /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Zend/File/Transfer/Adapter/Abstract.php:1035
    Stack trace:
    #0 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Omeka/File/Ingest/Upload.php(41): Zend_File_Transfer_Adapter_Abstract->setDestination('/var/chroot/hom...')
    #1 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Omeka/File/Ingest/Upload.php(113): Omeka_File_Ingest_Upload->_buildAdapter()
    #2 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Omeka/File/Ingest/Abstract.php(181): Omeka_File_Ingest_Upload->_parseFileInfo('file')
    #3 /home/content/g/w/i/gwijthoff/html/gadgetry/application/models/ItemBuilder.php(210): Omeka_File_Ingest_Abstract->ingest('file')
    #4 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/globals.php(491): ItemBuilder->addFiles('Upload', 'file', Array)
    #5 /home/content/g/w/i/gwijthoff/html/gadgetry/application/models/Item.php(270): insert_files_for_item(Object(Item), 'Upload', 'file', Array)
    #6 /home/content/g/w/i/gwijthoff/html/gadgetry/application/models/Item.php(154): Item->_uploadFiles()
    #7 [internal function]: Item->beforeSaveForm(Object(ArrayObject))
    #8 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Omeka/Record.php(284): call_user_func_array(Array, Array)
    #9 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Omeka/Record.php(805): Omeka_Record->runCallbacks('beforeSaveForm', Object(ArrayObject))
    #10 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Omeka/Controller/Action.php(420): Omeka_Record->saveForm(Array)
    #11 /home/content/g/w/i/gwijthoff/html/gadgetry/application/controllers/ItemsController.php(134): Omeka_Controller_Action->addAction()
    #12 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Zend/Controller/Action.php(513): ItemsController->addAction()
    #13 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('addAction')
    #14 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #15 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
    #16 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
    #17 /home/content/g/w/i/gwijthoff/html/gadgetry/application/libraries/Omeka/Core.php(166): Zend_Application->run()
    #18 /home/content/g/w/i/gwijthoff/html/gadgetry/admin/index.php(45): Omeka_Core->run()
    #19 {main}
  2. Your system appears to be telling Omeka to use a temporary directory that doesn't exist (you can't see the whole thing in the stack trace, but the path starts with "/var/chroot/hom...").

    I'm not sure what the underlying problem is, but you should be able to avoid this by adding a setting in Omeka's application/config/config.ini:

    storage.tempDir = "/some/path"

    Where "/some/path" is a path to a directory Omeka can write to and use for temporary storage of files.

  3. Having the same issue.

    Fixed it in config.ini by adding storage.tempDir = "/tmp"

    However, this just gave way to another error.

    Omeka_Storage_Exception
    The storage adapter is not initialized.
    #0 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/models/File.php(129): Omeka_Storage->__call('getUri', Array)
    #1 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/models/File.php(129): Omeka_Storage->getUri('files/dd3fe4985...')
    #2 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/helpers/Media.php(504): File->getWebPath('archive')
    #3 [internal function]: Omeka_View_Helper_Media->mov(Object(File), Array)
    #4 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/helpers/Media.php(727): call_user_func_array(Array, Array)
    #5 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/helpers/Media.php(752): Omeka_View_Helper_Media->getHtml(Object(File), 'mov', Array)
    #6 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/helpers/FileFunctions.php(45): Omeka_View_Helper_Media->media(Object(File), Array, Array)
    #7 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/helpers/ItemFunctions.php(42): display_files(Array, Array, Array)
    #8 /home/content/e/b/e/ebellempire/html/omeka-sandbox/admin/themes/default/items/show.php(42): display_files_for_item(Array)
    #9 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Omeka/View.php(113): include('/home/content/e...')
    #10 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run('/home/content/e...')
    #11 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(900): Zend_View_Abstract->render('items/show.php')
    #12 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(921): Zend_Controller_Action_Helper_ViewRenderer->renderScript('items/show.php', NULL)
    #13 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(960): Zend_Controller_Action_Helper_ViewRenderer->render()
    #14 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
    #15 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
    #16 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('showAction')
    #17 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
    #18 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
    #19 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
    #20 /home/content/e/b/e/ebellempire/html/omeka-sandbox/application/libraries/Omeka/Core.php(165): Zend_Application->run()
    #21 /home/content/e/b/e/ebellempire/html/omeka-sandbox/admin/index.php(44): Omeka_Core->run()
    #22 {main}
  4. Hmm...

    It must be that the option for the "default" adapter doesn't get used if you specify any other storage options.

    Adding

    storage.adapter = "Omeka_Storage_Adapter_Filesystem"

    should fix that.

  5. Perfect. Thanks.

Reply

You must log in to post.