Magento Warning: simplexml_load_file() [function.simplexml-load-file]: (null)

You get this error while entering the magento admin home page after login. The home page has a number of warnings and talks about locales. A sample error listing shown is:

Warning: simplexml_load_file() [function.simplexml-load-file]: (null)(null)/home/runinsty/public_html/paths/lib/Zend/Locale/Data/ko.xml:2780: parser error : out of memory error in /home/runinsty/public_html/paths/lib/Zend/Locale/Data.php on line 146
Trace:

#0 /home/runinsty/public_html/paths/lib/Zend/Locale/Data.php(146): mageCoreErrorHandler(2, ‘simplexml_load_…’, ‘/home/runinsty/…’, 146, Array)
#1 /home/runinsty/public_html/paths/lib/Zend/Locale/Data.php(217): Zend_Locale_Data::_findRoute(’/home/runinsty/…’)
#2 /home/runinsty/public_html/paths/lib/Zend/Locale/Data.php(231): Zend_Locale_Data::_getFile(’ko’, ‘/ldml/localeDis…’, ‘type’, false, Array)
#3 /home/runinsty/public_html/paths/lib/Zend/Locale/Data.php(787): Zend_Locale_Data::_getFile(’ko’, ‘/ldml/localeDis…’, ‘type’, false, Array)
#4 /home/runinsty/public_html/paths/lib/Zend/Locale.php(594): Zend_Locale_Data::getContent(’ko_KR’, ‘/ldml/localeDis…’, ‘type’)
#5 /home/runinsty/public_html/paths/lib/Zend/Locale.php(611): Zend_Locale::getTranslation(’ko_KR’, ‘language’, ‘ko’)
#6 /home/runinsty/public_html/paths/app/code/core/Mage/Core/Model/Locale.php(246): Zend_Locale::getLanguageTranslation(’ko’, ‘language’, ‘ko_KR’)
#7 /home/runinsty/public_html/paths/app/code/core/Mage/Core/Model/Locale.php(219): Mage_Core_Model_Locale->_getOptionLocales(’ko’, ‘ko_KR’)
#8 /home/runinsty/public_html/paths/app/code/core/Mage/Adminhtml/Block/Page/Footer.php(67): Mage_Core_Model_Locale->getTranslatedOptionLocales(true)
#9 /home/runinsty/public_html/paths/app/design/adminhtml/default/default/template/page/footer.phtml(29): Mage_Adminhtml_Block_Page_Footer->getLanguageSelect()
#10 /home/runinsty/public_html/paths/app/code/core/Mage/Core/Block/Template.php(144): include(’/home/runinsty/…’)

To solve this there are two things to be done, firstly ensure that the memory_limit value for php is more than 64Mb. Next notice the first line in the error sample:

home/runinsty/public_html/paths/lib/Zend/Locale/Data/ko.xml

What we are interested here is the locale ko

Now go to the file /home/runinsty/www/app/etc/config.xml search for the tag <codes> . A listing similar to the below will be seen:

<locale>
<allow>
<codes>
<af_ZA/><!– Afrikaans (South Africa) –>
<ar_EG/><!– Arabic (Egypt) –>
<ar_KW/><!– Arabic (Kuwait) –>
<ar_MA/><!– Arabic (Morocco) –>
<ar_SA/><!– Arabic (Saudi Arabia) –>
<az_AZ/><!– Azerbaijani (Azerbaijan) –>
<bg_BG/><!– Bulgarian (Bulgaria) –>
<bn_BD/><!– Bengali (Bangladesh) –>
<bs_BA/><!– Bosnian (Bosnia) –>
<ca_ES/><!– Catalan (Catalonia) –>
<cs_CZ/><!– Czech (Czech Republic) –>
<cy_GB/><!– Welsh (United Kingdom) –>
<da_DK/><!– Danish (Denmark) –>
<km_KH/><!– Khmer (Cambodia) –>
<ko_KR/><!– Korean (South Korea) –>
<lo_LA/><!– Lao (Laos) –>
<lt_LT/><!– Lithuanian (Lithuania) –>
<lv_LV/><!– Latvian (Latvia) –>
<mk_MK/><!– Macedonian (Macedonia) –>
<mn_MN/><!– Mongolian (Mongolia) –>
<ms_MY/><!– Malaysian (Malaysia) –>
<nl_NL/><!– Dutch (Netherlands) –>
<nb_NO/><!– Norwegian Bokmål (Norway) –>

Now delete all the xml tag lines beginning with <ko_ .

Next clear your browser cache and revisit your page to see the error fly away.

Post to Twitter Tweet This Post

Related posts:

  1. How to fix the jftp error in joomla JFTP::store: Bad response – Warning! – Failed to move file.
  2. Load Average and CPU usage in Linux!
  3. How to use curvycorners in Magento themes
  4. Magento Installation SOAP error in loading WSDL
  5. Chapter 8 File types in Linux.

3 Comments

did not work

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 38: parser error : Entity ‘trade’ not defined in /www/magento/lib/Varien/Simplexml/Config.php on line 510
Trace:
#0 /www/magento/lib/Varien/Simplexml/Config.php(510): mageCoreErrorHandler(2, ‘simplexml_load_…’, ‘/content/Hostin…’, 510, Array)
#1 /www/magento/lib/Varien/Simplexml/Config.php(498): Varien_Simplexml_Config->loadString(’loadFile(’loadModulesConfiguration(’/content/Hostin…’)
#4 /www/magento/app/code/core/Mage/Adminhtml/Model/Config.php(63): Mage_Adminhtml_Model_Config->_initSectionsAndTabs(’system.xml’)
#5 /www/magento/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(70): Mage_Adminhtml_Model_Config->getSections()
#6 /www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Adminhtml_System_ConfigController->editAction(NULL)
#7 /www/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch()
#8 /www/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(’edit’)
#9 /www/magento/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch(Object(Mage_Core_Controller_Request_Http))
#10 /www/magento/index.php(65): Mage::run()
#11 {main}

Will really really appreciate if someone can help me with getting this going. I am at the last lap of the entire project and this has put a spanner in the works. Friends please help urgently.

@Saurabh Where are you getting this error? Have you made any recent changes?

Comment Form

About this blog

This blog, acts as a knowledge repository for the world and is unofficial! Anything we find interesting in the cyber world will go here. Most cases, this blog will reflect the happiness of our staff in reaching successful solution to an issue (s)he worked on. A reference for other fellow SAGEs who come across similar issues later