SimpleXML disabled after upgrading to PHP 7 [Solved]
Last night, I completed minor server maintenance. It involves checking checking CPU and memory usage, error logs, etc. Finally, I finished it all with the following commands:
sudo apt-get update sudo apt-get upgrade
Little did I know that this routine will break parts of the sites I manage. I woke up early morning and had to update a post. Unfortunately, I couldn’t. ModX’s manager gives me a blank page. It was working last night. I even published an article about the Nextbit Robin. This narrowed down the cause to last night’s upgrade.
Logs says something about MagpieRSS and issues with PHP XML parsing of sort. This narrowed down the issue to PHP 7, which I recently installed. An update broke parts of it; a part that has something to do with XML.
I manage about 10 blogs on two separate servers by DigitalOcean. The two have exactly the same config (Ubuntu 14.04, Nginx, PHP 7). The blogs run on either ModX Revo 2.5.0 or the latest WordPress. All WP sites work without any noticeable issue. This limit the problem to ModX’s manager section. After posting about it on Github,, I was reminded that ModX requires the SimpleXML extension.
phpinfo() and php -m both yielded negative results, which means that the upgrade somehow disabled SimpleXML.
Fixing it was pretty simple:
sudo apt-get install php7.0-xml
This reinstalled/re-enabled SimpleXML and everything is working as intended.