3

This question already has an answer here:

This is my System.log what is this problem? what should i do to fix this?

2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 197: parser error : expected '>'  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string(): congo-kinshasa-post><ftd>0</ftd><cook-islands-post>0</cook-islands-post><2go>0</  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 197: parser error : Opening and ending tag mismatch: config line 1 and unparseable  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string(): congo-kinshasa-post><ftd>0</ftd><cook-islands-post>0</cook-islands-post><2go>0</  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 197: parser error : Extra content at the end of the document  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string(): congo-kinshasa-post><ftd>0</ftd><cook-islands-post>0</cook-islands-post><2go>0</  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-24T16:44:40+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383

I have used the script from @sv3n and detected a file with problems, now this file its ok. But the error is still happening:

2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string(): ost>0</congo-kinshasa-post><ftd>0</ftd><cook-islands-post>0</cook-islands-post><  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 197: parser error : expected '>'  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string(): congo-kinshasa-post><ftd>0</ftd><cook-islands-post>0</cook-islands-post><2go>0</  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 197: parser error : Opening and ending tag mismatch: config line 1 and unparseable  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string(): congo-kinshasa-post><ftd>0</ftd><cook-islands-post>0</cook-islands-post><2go>0</  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 197: parser error : Extra content at the end of the document  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string(): congo-kinshasa-post><ftd>0</ftd><cook-islands-post>0</cook-islands-post><2go>0</  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383
2017-10-25T10:48:41+00:00 ERR (3): Warning: simplexml_load_string():                                                                                ^  in /var/www/vhosts/website.com/main_folder/lib/Varien/Simplexml/Config.php on line 383

marked as duplicate by sv3n, Siarhey Uchukhlebau, Manoj Deswal, Jai, Manthan Dave Oct 25 '17 at 5:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Flush (config/layout) cache after fixing XML. – sv3n Oct 25 '17 at 11:14
  • I have already done it... – José Rodrigues Oct 25 '17 at 11:43
  • Has this worked for you? – sv3n Feb 6 '18 at 19:48
4

Seems one of your parsed XML files isn't valid - like mismatching open/close tags.

See: Magento parser error "Start tag expected, '<' not found"


Please check your config.xml, system.xml and all the layout.xml files.

For debugging you can try this ... create file in magento root

<?php
require_once('./app/Mage.php');
umask(0);
Mage::app();

// enable user error handling
libxml_use_internal_errors(true);

// adjust template path
$dir = "./app/design/frontend/base/default/layout/*";

foreach(glob($dir) as $file) {
    $xml = simplexml_load_file($file);
    foreach (libxml_get_errors() as $error) {
        Mage::log($error);
    }
    libxml_clear_errors();
}

Output looks like

2017-06-20T13:28:21+00:00 DEBUG (7): Array
(
    [0] => ./app/design/frontend/base/default/layout/catalog.xml
    [1] => LibXMLError Object
        (
            [level] => 3
            [code] => 76
            [column] => 28
            [message] => Opening and ending tag mismatch: reference line 191 and catalog_product_view

            [file] => ./app/design/frontend/base/default/layout/catalog.xml
            [line] => 262
        )

)

Source: http://www.php.net/manual/en/function.libxml-use-internal-errors.php


Edit: check all XML files ...

<?php
require_once('./app/Mage.php');
umask(0);
Mage::app();

// enable user error handling
libxml_use_internal_errors(true);

$root = './app';
$iterator  = new RecursiveIteratorIterator(
    new RecursiveDirectoryIterator($root, RecursiveDirectoryIterator::SKIP_DOTS),
    RecursiveIteratorIterator::SELF_FIRST,
    RecursiveIteratorIterator::CATCH_GET_CHILD
);

foreach ($iterator as $path => $item) {
    if ($item->isFile() && $item->getExtension() == 'xml') {
        $xml = simplexml_load_file($path);
        foreach (libxml_get_errors() as $error) {
            Mage::log($error);
        }
        libxml_clear_errors();
    }
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.