Fix Class 'DOMDocument' not found error

If you are using the DOMDocument in your projects and get this error:

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

after installing PHP in Ubuntu 18.04 you can fix it installing php-xml package

$ sudo apt install php-xml

For mod_php restart the Apache server

$ sudo systemctl restart apache2

For php_fpm restart the fpm service

$ sudo systemctl restart php-fpm
The tutorials here on LibreByte are provided under a free software licence. if you like my work you should consider:
Buy a Hosting/VPS or Dedicated Server at MCKHost

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.