[EP-tech] XML parsing error message
L.E.Green-Hughes at kent.ac.uk
Tue Oct 16 11:10:13 BST 2018
I have come across a bit of an issue with parsing Phrase XML files on EPrints when hosted on RedHat/Centos 7 (I haven't seen this on RedHat 6). Lots of messages like these are being produced:
"Failed to parse XML file: /usr/share/eprints/archives/datadev/cfg/lang/en/phrases/archive_name.xml: error : func=xmlSecNoXxeExternalEntityLoader:file=xmlsec.c:line=53:obj=unknown:subj=xmlSecNoXxeExternalEntityLoader:error=5:libxml2 library function failed:illegal external entity='file:///usr/share/eprints/lib/entities.dtd/entities.dtd'"
It seems that libxml2 is not allowed to parse external DTD files by default on RedHat7. The only way I could get it working was to insert a line to switch off network access to DTD in perl_lib/EPrints/XML/LibXML.pm:
our $PARSER = XML::LibXML->new();
# Added by LGH
Has anyone else come across this?
Liam Green-Hughes | Library Systems Developer
Learning and Research Development, Information Services, University of Kent
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Eprints-tech