I have an application, my dev environment is nginx and it works great. Production is apache, PHP7.3, mysql 5.7
I am getting the following error:
Uncaught PHP Exception Symfony\Component\Validator\Exception\MappingException: "Extension DOM is required." at /var/www/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php line 181 {"exception":"[object] (Symfony\\Component\\Validator\\Exception\\MappingException(code: 0): Extension DOM is required. at /var/www/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php:181, LogicException(code: 0): Extension DOM is required. at /var/www/vendor/symfony/config/Util/XmlUtils.php:50)"} []
Everythng I read shows it should be because of php-xml (its installed), and enabled.
Anything else I can look into?
I had to install the package explicitly for php 7.3
.
So, at least for Ubuntu, that'll be:
sudo apt install php7.3-xml
You should then be good after a webserver reload/restart.
The host had installed apache php 7.2 and php-cli as 7.3, so when doing apt install php-xml it installed only for 7.3. that was reason for failing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With