Class 'SimpleXMLElement' not found on puphpet PHP 5.6

流过昼夜 提交于 2019-11-28 22:37:36

The problem was that I was using Cent OS and in this Linux Distribution, the php-libxml package does not come as default.

I ended up generating a new machine through PuPHPet GUI and added to the System Package the following packages to be installed:

php-xml, php-simplexml

Problem solved.


For those using PHP 7 and Ubuntu, @MPS solved it by running apt-get install php7.0-xml and service apache2 restart.

On Centos, we need to install the XML php package. You can try yum install php56w-xml or yum install php70w-xml if you're using php70w repository for PHP 7.0

I faced this issued and finally solved by run following command :

apt install php5.6-xml

After it reload and restart apache2 service :

service apache2 reload   

service apache2 restart

If you are running ubuntu in AWS Cloud 9. Then from your menu bar->Window->New Terminal->type sudo apt install php-xml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!