Error Message with OHMS Import

Hello,
I saw a similar issue posted last year but remained unresolved. Can anyone tell me what to do to fix this error when attempting to import an OHMS xml file? I’m fairly certain we followed the directions correctly, but perhaps not.

Warning : rename(/tmp/4fac7eefa75c39369eff1e958d014da6,/var/www/html/collections/plugins/OhmsImport/zips/4fac7eefa75c39369eff1e958d014da6.zip): Permission denied in /var/www/html/collections/plugins/OhmsImport/controllers/IndexController.php on line 65

Warning : mkdir(): Permission denied in /var/www/html/collections/plugins/OhmsImport/controllers/IndexController.php on line 67

Fatal error : Uncaught Error: Class ‘ZipArchive’ not found in /var/www/html/collections/plugins/OhmsImport/controllers/IndexController.php:69 Stack trace: #0 /var/www/html/collections/application/libraries/Zend/Controller/Action.php(516): OhmsImport_IndexController->indexAction() #1 /var/www/html/collections/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘indexAction’) #2 /var/www/html/collections/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #3 /var/www/html/collections/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch() #4 /var/www/html/collections/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #5 /var/www/html/collections/application/libraries/Omeka/Application.php(77): Zend_Application->run() #6 /var/www/html/collections/admin/index.php(28): in /var/www/html/collections/plugins/OhmsImport/controllers/IndexController.php on line 69

This looks like a couple different problems.

First, you need the “zip” extension for PHP, so you need to install that or check with your host about getting it installed. That’s the source of the “Fatal error” here.

Also, the permissions issues seem like they would probably be an issue on their own… from just a quick look at these messages, I’d say that the “zips” folder underneath the OhmsImport plugin folder needs to be made writable by the server (basically, it needs the same permissions as the Omeka “files” directory has).

Thanks so much for your quick reply!

We’ve changed the permissions on the directories as well as installed the php zip module. We can see the zip module is now installed by doing a php –m. It wasn’t previously listed.

We are now receiving this error.log in apache2:

[Wed Jan 15 09:53:49.851184 2020] [:error] [pid 29540] [client 131.210.6.208:54922] PHP Warning: rmdir(/var/www/html/collections/plugins/OhmsImport/zips/6ff7488840e1b1f3f1717c3564f6ef76/): Directory not empty in /var/www/html/collections/plugins/OhmsImport/controllers/IndexController.php on line 167, referer: https://archives.uwp.edu/admin/ohms-import

Any idea of what the issue is?

Is it still not working?

That error indicates the plugin is trying to remove a directory that has some contents still in it… but it doesn’t look like something that would necessarily prevent it from working.

Oh wait - yes it’s working now. That last one was user error.
Thanks again!