Fatal error on Zend's librarie file

Hi

I just upgraded php to version 8, and checking my omeka site, for any issue after this rather critical process, I found this error when enabling development mode:

  Fatal error: Uncaught ValueError: version_compare(): Argument 
  #3 ($operator) must be a valid comparison operator in /var/www/my-omeka-site.site/application/libraries/Zend/Xml/Security.php:172 Stack trace: 
  #0 /var/www/my-omeka-site.site/application/libraries/Zend/Xml/Security.php(172): version_compare() 
  #1 /var/www/my-omeka-site.site/application/libraries/Zend/Xml/Security.php(76): Zend_Xml_Security::isPhpFpm() 
  #2 /var/www/my-omeka-site.site/application/libraries/Zend/Xml/Security.php(150): Zend_Xml_Security::scan() 
  #3 /var/www/my-omeka-site.site/application/libraries/Zend/Locale/Data.php(160): Zend_Xml_Security::scanFile() 
  #4 /var/www/my-omeka-site.site/application/libraries/Zend/Locale/Data.php(232): Zend_Locale_Data::_findRoute() 
  #5 /var/www/my-omeka-site.site/application/libraries/Zend/Locale/Data.php(1137): Zend_Locale_Data::_getFile() 
  #6 /var/www/my-omeka-site.site/application/libraries/Zend/Date.php(843): Zend_Locale_Data::getContent() 
  #7 /var/www/my-omeka-site.site/application/libraries/Zend/Date.php(580): Zend_Date->_parseIsoToDate() 
  #8 /var/www/my-omeka-site.site/application/libraries/Zend/Date.php(466): Zend_Date->_toToken() 
  #9 /var/www/my-omeka-site.site/application/libraries/globals.php(1006): Zend_Date->toString() 
  #10 /var/www/my-omeka-site.site/application/models/Item.php(489): format_date() 
  #11 /var/www/my-omeka-site.site/application/models/Item.php(202): Item->getCitation() 
  #12 /var/www/my-omeka-site.site/application/views/helpers/Metadata.php(169): Item->getProperty() 
  #13 /var/www/my-omeka-site.site/application/views/helpers/Metadata.php(144): Omeka_View_Helper_Metadata->_getRecordMetadata() 
  #14 /var/www/my-omeka-site.site/application/views/helpers/Metadata.php(73): Omeka_View_Helper_Metadata->_getText() 
  #15 /var/www/my-omeka-site.site/application/libraries/Zend/View/Abstract.php(349): Omeka_View_Helper_Metadata->metadata() 
  #16 /var/www/my-omeka-site.site/application/libraries/globals.php(2042): Zend_View_Abstract->__call() 
  #17 /var/www/my-omeka-site.site/themes/thanksroy/items/show.php(39): metadata() 
  #18 /var/www/my-omeka-site.site/application/libraries/Omeka/View.php(114): include('...') 
  #19 /var/www/my-omeka-site.site/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run() 
  #20 /var/www/my-omeka-site.site/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render() 
  #21 /var/www/my-omeka-site.site/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript() 
  #22 /var/www/my-omeka-site.site/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render() 
  #23 /var/www/my-omeka-site.site/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch() 
  #24 /var/www/my-omeka-site.site/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch() 
  #25 /var/www/my-omeka-site.site/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch() 
  #26 /var/www/my-omeka-site.site/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch() 
  #27 /var/www/my-omeka-site.site/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch() 
  #28 /var/www/my-omeka-site.site/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() 
  #29 /var/www/my-omeka-site.site/application/libraries/Omeka/Application.php(73): Zend_Application->run() 
  #30 /var/www/my-omeka-site.site/index.php(23): Omeka_Application->run() 
  #31 {main} thrown in /var/www/my-omeka-site.site/application/libraries/Zend/Xml/Security.php on line 172

Sincerely I don’t remember if I’ve seen this before the php upgrade.

Whatever, I’d like to know how fatal this error is…

I tried to track out some of the code these log points to, but no luck with that… no many skills on php :unamused:

Thanks on regards.

What version of Omeka are you using? You probably just need to upgrade: the latest version has fixes for PHP 8.

2.7.1

It sounds like a good idea to upgrade my omeka .

I will.

sorry about this delay.

Yes… upgrading omeka solve the problem :slight_smile:

One more question:
What do you recommend? upgrade omeka before or after upgrading to php8??

Thank you!!

Upgrading before is probably better: if you upgrade PHP to an unsupported version then Omeka will likely not work or have warnings or errors displayed until you do upgrade to a version that supports your new PHP. If you do it the other way around it can be basically seamless.