On our Magento store (ver 1.9.01) I recently discovered that our system.log file was 21GB! There seems to be an error regarding a particular line of code which is reoccurring over and over again, here's an example of the errors:
2015-09-26T06:06:29+00:00 ERR (3): Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: ufacturers/resized/A5M-Logo.png</33><25>manufacturers/resized/aima-logo_1_.png</ in /home/pharm1/public_html/lib/Varien/Simplexml/Config.php on line 383
2015-09-26T06:06:29+00:00 ERR (3): Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: ^ in /home/pharm1/public_html/lib/Varien/Simplexml/Config.php on line 383
2015-09-26T06:06:29+00:00 ERR (3): Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: Entity: line 49: parser error : StartTag: invalid element name in /home/pharm1/public_html/lib/Varien/Simplexml/Config.php on line 383
2015-09-26T06:06:29+00:00 ERR (3): Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: turers/resized/A5M-Logo.png</33><25>manufacturers/resized/aima-logo_1_.png</25>< in /home/pharm1/public_html/lib/Varien/Simplexml/Config.php on line 383
2015-09-26T06:06:29+00:00 ERR (3): Warning: simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: ^ in /home/pharm1/public_html/lib/Varien/Simplexml/Config.php on line 383
Here's the offending piece of code in the config file:
public function loadCache()
{
if (!$this->validateCacheChecksum()) {
return false;
}
$xmlString = $this->_loadCache($this->getCacheId());
$xml = simplexml_load_string($xmlString, $this->_elementClass);
if ($xml) {
$this->_xml = $xml;
$this->setCacheSaved(true);
return true;
}
return false;
}
With the line beginning with $xml being the offending line 383.
Please can someone help me get rid of this error? Many thanks.
Try adding the following just after the simplexml_load_string(..) call:
Mage::log(print_r($file, true));
This will make the log give you a list of all the files loaded at the time the string failed to parse. People have said that the last file on the list is most likely the culprit, but I haven't had much luck with that.
There's similar topics here: Magento simplexml_load_string() error location
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.