Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

879
Vistas
Symfony 2.8 project using PHP7 : Extension DOM is required

I'm trying to upgrade from php 5 to 7 on a server hosting a symfony project. Actually the update from php 5 to 7 worked ;

php --version
PHP 7.2.29 (cli) (built: Mar 17 2020 11:58:47) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.29, Copyright (c) 1999-2018, by Zend Technologies

but now on my server only "public" pages worked, I mean when I go a page that needs the ORM it returns a 500 internal error. The log server file gives me this output :

[2020-03-20 14:38:49] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Validator\Exception\MappingException: "Extension DOM is required." at /var/www/myProject/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php line 179 {"exception":"[object] (Symfony\\Component\\Validator\\Exception\\MappingException(code: 0): Extension DOM is required. at /var/www/myProject/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php:179, RuntimeException(code: 0): Extension DOM is required. at /var/www/myProject/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:45)"} []
[2020-03-20 14:38:50] security.INFO: No expression found; abstaining from voting. [] []
[2020-03-20 14:38:50] security.INFO: No expression found; abstaining from voting. [] []

So I googled the error and thus I did that :

sudo yum install php72-php-mbstring php72-php-xml php72-php-xmlrpc

Then :

php -d memory_limit=-1 composer.phar update --no-cache
php -d memory_limit=-1  app/console cache:clear --env=prod
sudo systemctl restart httpd.service

And I still got this error...

EDIT : The cli version is PHP 7.2.29 which uses /etc/opt/remi/php72/php.ini file and the server PHP (showed by phpinfo(); function ) show PHP version 7.2.28 which uses /etc/php.ini file. I think I have to investigate with some apache config.

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You should check that extension is actually loaded. Do keep in mind that PHP CLI and PHP used by your webserver are two different beasts and may very well have different configuration files. Create a simple .php page in your project with

<?php phpinfo();

...navigate to it in your browser and see what extensions are actually loaded.

Follow instructions from your distribution to activate missing ones.

over 4 years ago · Santiago Trujillo Denunciar

0

So actually the solution was :

1 re-link my package version with the 'good' version of PHP used by my server (uninstall and re install php 7.2)

and 2 type sudo yum install php-sql

That's strange but that solved my problem.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda