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
try following
Not working.
I have done everything that you suggested@Yogesh Sharma 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.
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
This may not be relevant in 2018, but we hit this one and the `composer dumpautoload -o` actually helped us narrow down the issue in 2021.
Since composer has reached 2.x and as of Magento 2.4 the autoloader is only compatible with composer 1.x. According to Magento's release cycle, we may have to endure this for at least 1 year.
Fresh installations may hit this problem quite frequently in the near future, downgrading composer to 1.x should help.