J'ai vérifié toutes les questions liées, mais les solutions n'ont pas résolu le problème que je reçois.PHP Erreur irrécupérable: Uncaught Erreur: Classe 'DOMDocument' introuvable sur Symfony
Je suis en train de définir une instance EC2, l'installation php7.0, mysql, compositeur, cloné le dépôt, etc ..
Cette instance EC2 est un Centos 6.5.
Mais quand:
php bin/console cache:clear --env=prod --no-debug
Je reçois:
PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /var/www/html/TFM_RedSocialMusical/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52
Stack trace:
#0 /var/www/html/TFM_RedSocialMusical/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(263): Symfony\Component\Config\Util\XmlUtils::loadFile('/var/www/html/T...', Array)
#1 /var/www/html/TFM_RedSocialMusical/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(41): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->parseFileToDOM('/var/www/html/T...')
#2 /var/www/html/TFM_RedSocialMusical/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(72): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->load('web.xml')
#3 /var/www/html/TFM_RedSocialMusical/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php(59): Symfony\Bundle\FrameworkBundle\Dependen in /var/www/html/TFM_RedSocialMusical/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php on line 52
Eh bien, à la recherche des questions similaires, la solution est purposed:
sudo yum install php-xml
Je reçois:
Loaded plugins: fastestmirror, presto
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: ftp.heanet.ie
* epel: ftp.heanet.ie
* extras: ftp.heanet.ie
* ius: mirrors.ircam.fr
* updates: ftp.heanet.ie
Resolving Dependencies
--> Running transaction check
---> Package php-xml.x86_64 0:5.3.3-49.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-49.el6 for package: php-xml-5.3.3-49.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-5.3.3-49.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-5.3.3-49.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-5.3.3-49.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-5.3.3-49.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-5.3.3-49.el6.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-5.3.3-49.el6.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-5.3.3-49.el6.x86_64
--> Running transaction check
---> Package libxslt.x86_64 0:1.1.26-2.el6_3.1 will be installed
---> Package php-common.x86_64 0:5.3.3-49.el6 will be installed
--> Processing Conflict: php70u-common-7.0.20-1.ius.centos6.x86_64 conflicts php-common < 7.0.20
--> Processing Conflict: php70u-json-7.0.20-1.ius.centos6.x86_64 conflicts php-json < 7.0.20
--> Finished Dependency Resolution
Error: php70u-common conflicts with php-common-5.3.3-49.el6.x86_64
Error: php70u-json conflicts with php-common-5.3.3-49.el6.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
J'ai installé le php70u-common, mais comment éviter ce conflit avec php-common-5.3.3-49?
Merci à l'avance
Voyez comment il y a 'php70u-common' et' php70u-json'? Il y a probablement un paquet appelé 'php70u-xml'. – ceejayoz
Merde! J'avais essayé avec php70-xml, php7.0-xml sans chance! Cela a fonctionné @ceejayoz – Albeis