Search code examples
phpsymfony-2.8php-7.2amazon-linux

DOM extension on PHP 7.2 Amazon Linux 2


I'm getting the error message below from a Symfony 2.8 application running PHP 7.2.8 on an Amazon Linux 2 server.

Fatal error: Uncaught RuntimeException: Extension DOM is required. in /var/www/html/my-app/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:45

php-xml is installed. Other common/related libraries are installed too - php-mbstring, php-common.

In phpinfo, I cannot see the "DOM" section. Below is the screen shot of the installed php-related libraries (yum list installed | grep php*)

enter image description here

What am I missing here?


Solution

  • After 2 days of nit-picking it turned out restarting php-fpm resolves the issue, though I was restarting httpd all along.

    sudo systemctl restart php-fpm