- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor
try following
- rename or remove vendor folder in root
- composer install
- composer update
- composer dumpautoload -o
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor
Not working.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Fatal error:Uncaught Error:Class 'DOMDocument' not found in /var/www/html/shop/vendor
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.