Zend Error When Adding Items

Hi All! We’ve just installed Omeka on a fresh Ubuntu 16.0.4.1 LTS server with all the latest (PHP 7, etc). Omeka is otherwise running fine, with the exception of adding items. After turning on errors, we get the following when clicking on the Add Item button:

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/application/libraries/globals.php on line 2862
Add New Files

Fatal error: Uncaught Error: Call to undefined function simplexml_load_file() in /var/www/application/libraries/Zend/Locale/Data.php:161 Stack trace: #0 /var/www/application/libraries/Zend/Locale/Data.php(231): Zend_Locale_Data::_findRoute(‘en_US’, ‘/ldml/numbers/s…’, ‘’, ‘decimal’, Array) #1 /var/www/application/libraries/Zend/Locale/Data.php(589): Zend_Locale_Data::_getFile(‘en_US’, ‘/ldml/numbers/s…’, ‘’, ‘decimal’) #2 /var/www/application/libraries/Zend/Locale/Format.php(513): Zend_Locale_Data::getList(‘en_US’, ‘symbols’) #3 /var/www/application/libraries/Zend/Locale/Format.php(251): Zend_Locale_Format::isNumber(‘8’, Array) #4 /var/www/application/libraries/Zend/Measure/Abstract.php(202): Zend_Locale_Format::getNumber(‘8’, Array) #5 /var/www/application/libraries/Zend/Measure/Abstract.php(99): Zend_Measure_Abstract->setValue(‘8’, ‘MEGABYTE’, ‘en_US’) #6 /var/www/application/views/helpers/MaxFileSize.php(82): Zend_Measure_Abstract->__construct(‘8’, ‘MEGABYTE’) #7 /var/www/application/views/helpers/MaxFileSize.php(2 in /var/www/application/libraries/Zend/Locale/Data.php on line 161

We’re not opposed to hacking up some PHP, but it appears that our LAMP server is too fresh for Omeka. Any ideas?

Thanks,
Brann Mitchell | SFCM

What version of Omeka is this? It doesn’t sound like you’re using the newest version, or even a particularly recent one.

Thanks for the speedy reply. Well, yes, it was Omeka-2.0… I’ve downloaded and upgraded the install to 2.4.1. However, we still get a Zend error:

Fatal error: Uncaught Error: Class ‘DOMDocument’ not found in /var/www/application/libraries/Zend/Xml/Security.php:82 Stack trace: #0 /var/www/application/libraries/Zend/Xml/Security.php(150): Zend_Xml_Security::scan(’<?xml version="…’, NULL) #1 /var/www/application/libraries/Zend/Locale/Data.php(160): Zend_Xml_Security::scanFile(’/var/www/applic…’) #2 /var/www/application/libraries/Zend/Locale/Data.php(232): Zend_Locale_Data::_findRoute(‘en_US’, ‘/ldml/numbers/s…’, ‘’, ‘decimal’, Array) #3 /var/www/application/libraries/Zend/Locale/Data.php(627): Zend_Locale_Data::_getFile(‘en_US’, ‘/ldml/numbers/s…’, ‘’, ‘decimal’) #4 /var/www/application/libraries/Zend/Locale/Format.php(519): Zend_Locale_Data::getList(‘en_US’, ‘symbols’) #5 /var/www/application/libraries/Zend/Locale/Format.php(253): Zend_Locale_Format::isNumber(‘8’, Array) #6 /var/www/application/libraries/Zend/Measure/Abstract.php(202): Zend_Locale_Format::getNumber(‘8’, Array) #7 /var/www/application/libraries/Zend/Measure/Abstract.php(99): Zend_Measure_Abstr in /var/www/application/libraries/Zend/Xml/Security.php on line 82

Thanks,
Brann Mitchell | SFCM

That should just be solved by installing the dom extension for PHP. I believe on Ubuntu that’s in the package php7.0-xml.

Wow, yep, that did it. Installed the PHP extension, and it works! I’ll have our archivist see if she can break it :slight_smile:

Thanks so much for the help in getting it up and running!

Cheers,
Brann