Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP 7 DOMDocument not found

Tags:

php

symfony

I try run command: app/console cache:clear

This return me error:

An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowable
Error: Fatal error: Class 'DOMDocument' not found in /var/www/html/vendor/s
ymfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52

Ubuntu 14.04 LTS I use PHP 7 and install php5-dom not resolved my problem:

sudo apt-get install php5-dom 
like image 256
Rohan Warwar Avatar asked Feb 27 '16 10:02

Rohan Warwar


1 Answers

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

like image 177
Barry Last Avatar answered Oct 05 '22 19:10

Barry Last