?
avatar stovesy
stovesy
20 Feb 2015

Sorry for the not overly technical report.

I've been getting spurious ERROR_XML_LOAD. After a little bit of googling, it seems that this is caused by a setting which is under the control of my web host, and as far as I can gather, it may be due to other threads affecting a global setting.

http://stackoverflow.com/questions/20534866/intermittent-simplexml-load-file-i-o-warning-on-local-joomla-site

The main point of error was in language.php
$xml = simplexml_load_file($path);

Changing to this
$prevSetting = libxml_disable_entity_loader(false);
$xml = simplexml_load_string(file_get_contents($path));
libxml_disable_entity_loader($prevSetting);

has helped, but I'm still having errors in the admin, so I am guessing there are other occurrences of simplexml_load_file($path);

I also gather that setting libxml_disable_entity_loader(false) could cause some security issues.

I wonder if this needs investigating. Again, sorry for my lack of bug reporting etiquette.
PHP Version 5.4.17
Thread Safety disabled
libXML support active
libXML Compiled Version 2.7.6
libXML Loaded Version 20706
libXML streams enabled

Simplexml support enabled
Revision $Id: 692516840b2d7d6e7aedb0bedded1f53b764a99f $
Schema support enabled

XML Support active
XML Namespace Support active
libxml2 Version 2.7.6

avatar stovesy stovesy - open - 20 Feb 2015
avatar mbabker
mbabker - comment - 20 Feb 2015

Relevant PHP bug - https://bugs.php.net/bug.php?id=64938

On Friday, February 20, 2015, stovesy notifications@github.com wrote:

Sorry for the not overly technical report.

I've been getting spurious ERROR_XML_LOAD. After a little bit of googling,
it seems that this is caused by a setting which is under the control of my
web host, and as far as I can gather, it may be due to other threads
affecting a global setting.

http://stackoverflow.com/questions/20534866/intermittent-simplexml-load-file-i-o-warning-on-local-joomla-site

The main point of error was in language.php
$xml = simplexml_load_file($path);

Changing to this
$prevSetting = libxml_disable_entity_loader(false);
$xml = simplexml_load_string(file_get_contents($path));
libxml_disable_entity_loader($prevSetting);

has helped, but I'm still having errors in the admin, so I am guessing
there are other occurrences of simplexml_load_file($path);

I also gather that setting libxml_disable_entity_loader(false) could cause
some security issues.

I wonder if this needs investigating. Again, sorry for my lack of bug
reporting etiquette.
PHP Version 5.4.17
Thread Safety disabled
libXML support active
libXML Compiled Version 2.7.6
libXML Loaded Version 20706
libXML streams enabled

Simplexml support enabled
Revision $Id: 692516840b2d7d6e7aedb0bedded1f53b764a99f $
Schema support enabled

XML Support active
XML Namespace Support active
libxml2 Version 2.7.6


Reply to this email directly or view it on GitHub
#6129.

avatar brianteeman brianteeman - change - 23 Feb 2015
Labels Added: ?
avatar brianteeman
brianteeman - comment - 24 Feb 2015

As this is a php bug and not a joomla bug can it be closed here?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6129.
avatar stovesy stovesy - change - 25 Feb 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-02-25 10:30:53
avatar stovesy stovesy - close - 25 Feb 2015

Add a Comment

Login with GitHub to post a comment