5

I am trying to install Magento 2.0.2 on a GoDaddy "Ultimate Linux Hosting with cPanel" server. When I open the page I am given this error:

Fatal error: Class 'DOMDocument' not found in /home/intx/public_html/dev/vendor/magento/framework/Config/Dom.php on line 364

I have tried looking all over and can not figure out what I am supposed to do to fix this.

6

Install these 2 extention and restart apache

 sudo apt-get install php7.1-dom
 sudo apt-get install php7.1-xml
 sudo service apache2 restart

Note: php version according to your current php version

5

I know this is a pretty old question, but just in case someone came here (as I did)...

You have to install the php-dom module on your system, on debianlike systems:

apt-get install php-xml

And restart your server:

service apache2 restart
1

I have the same issue:

Fatal error: Uncaught Error: Class 'DOMDocument' not found in /var/www/html/vendor/magento/framework/Config/Dom.php:377

But i installed php7.0-xml package which is running

1

Hi I think that you have used php7.1 version, You can check that by using

php -v

You should change default php version to php 7.0 use command line

sudo update-alternatives --config php

then select correct version (php7.0)

0

for centos 7 (linux)

yum install php-xml

for ubuntu

apt-get install php-xml

use sudo if you are not a root user for privileges

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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