cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor

Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor

I am getting the below error.
"Fatal error: Uncaught Error: Class 'DOMDocument' not found in /var/www/html/shop/vendor/magento/framework/Xml/Parser.php:35 Stack trace: #0 /var/www/html/shop/vendor/magento/framework/ObjectManager/Factory/Compiled.php(60): Magento\Framework\Xml\Parser->__construct() #1 /var/www/html/shop/vendor/magento/framework/ObjectManager/Factory/Compiled.php(81): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...') #2 /var/www/html/shop/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...') #3 /var/www/html/shop/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Framewo...') #4 /var/www/html/shop/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...') #5 /var/www/html/shop/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framewo in /var/www/html/shop/vendor/magento/framework/Xml/Parser.php on line 35"

I have all the extensions installed and are running well still I am getting the error. Please help

4 REPLIES

Re: Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor

try following

  1. rename or remove vendor folder in root
  2. composer install
  3. composer update
  4. composer dumpautoload -o
--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor

Not working.

Re: Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor

I have done everything that you suggested@Neo The Coder but none of the command worked for me. Whereas everything is working fine in local environment, i m getting the error only in the development side. 

Re: Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor

seems to be there is an issue while reading xml file.Please check logs first and also identify the extension/s which are there in development and not in local environment