调用未定义的函数simplexml_load_string()

Call to undefined function simplexml_load_string()

I am getting this error on all the sites located on our server. Everything was working correctly until today and all of sudden this error poped up.

I have checked Simplexml and it is already installed on the server. Here is the error:

Fatal error: Call to undefined function simplexml_load_string() in .../lib/Varien/Simplexml/Config.php on line 510

Had the same problem today. I tried to check whether extension is loaded and I was getting true (from command line) Then I found that I was using multiple php versions and the site in question was using php5.4 which for some reason was failing for simplexml

Since I am in a cPanel/WHM environment I ran

yum install ea-php54-php-simplexml

which fixed the issue. This is for EasyApache4. Perhaps you can just update simplexml sepending on your flavour of linux.

Installing latest extension resolved the issue.

yum install ea-php56-php-simplexml