Class 'Domdocument' Not Found

Class 'DOMDocument' not found

You need to install the DOM extension. You can do so on Debian / Ubuntu using:

sudo apt-get install php-dom

And on Centos / Fedora / Red Hat:

yum install php-xml

If you get conflicts between PHP packages, you could try to see if the specific PHP version package exists instead: e.g. php53-xml if your system runs PHP5.3.

PHP 7 DOMDocument not found

I had the same issue on Ubuntu and fixed it doing the following

apt-get install php-xml

or

sudo apt-get install php-xml

if not as root

ERROR: Class 'DOMDocument' not found

You need the dom extension, as you have installed PHP 7.0 from remi-php70 repository, you need to pull this extension from the same repository.

yum --enablerepo=remi-php70 install php-dom

Probably simpler to enable this repository permanently to avoid such issue in the future, and take benefit of upcoming versions

yum-config-manager --enable remi-php70
yum install php-dom

As explained by the Wizard.

Magento: Class 'DOMDocument' not found

You need to install the php-dom and php-xml packages, however it looks like from you PHP info. that you have done so. If you are on Debian or Ubuntu you can make sure by running apt install php-dom php-xml

You likely need to restart PHP FPM or Apache for the changes to take effect - eg. systemctl restart php-fpm or systemctl restart apache2 (or systemctl restart httpd)

PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found on Symfony

As said on the comments, installing php70u-xml solved the problem.



Related Topics



Leave a reply



Submit