簡體   English   中英

Magento:找不到類“DOMDocument”

[英]Magento: Class 'DOMDocument' not found

我正在亞馬遜 AWS Lightsail 系統上安裝 Magento。 我已經安裝了 NGINX、MySQL 和 PHP

但我不斷收到此錯誤:

2018/11/11 11:31:14 [error] 24035#0: *1 FastCGI sent in stderr: "PHP     message: PHP Fatal error:  Uncaught Error: Class 'DOMDocument' not found in /var/www/html/vendor/magento/framework/Config/Dom.php:384
Stack trace:
#0 /var/www/html/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<?xml version="...')
#1 /var/www/html/vendor/magento/framework/ObjectManager/Config/Reader/Dom.php(70): Magento\Framework\Config\Dom->__construct('<?xml version="...', Object(Magento\Framework\App\Arguments\ValidationState), Array, 'xsi:type', NULL)
#2 /var/www/html/vendor/magento/framework/Config/Reader/Filesystem.php(149): Magento\Framework\ObjectManager\Config\Reader\Dom->_createConfigMerger('Magento\\Framewo...', '<?xml ve
rsion="...')
#3 /var/www/html/vendor/magento/framework/Config/Reader/Filesystem.php(130): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))
#4 /var/www/html/vendor/magento/framework/App/ObjectManagerFactory.php(275): Magento\Frame
work\Config\Reader\Filesystem->read('primary')
#5 /var" while reading response header from upstream, client: 118.209.48.25, server: tangopop.com.au, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "XX.XXX.XX.XXX"

安裝的模塊:

DOM     Christian Stocker, Rob Richards, Marcus Boerger 
xmlrpc
core library version    xmlrpc-epi v. 0.54
php extension version   7.2.11-4+0~20181106031710.10+jessie~1.gbp789850
author  Dan Libby
homepage    http://xmlrpc-epi.sourceforge.net
open sourced by     Epinions.com 
LIBXML, SimpleXML, XML, XMLReader, xmlrpc, XMLWriter

PHP 信息可用: http : //13.239.86.161/info.php

您需要安裝php-domphp-xml包,但從您的 PHP 信息來看,它看起來像。 你這樣做了。 如果您使用的是 Debian 或 Ubuntu,則可以通過運行apt install php-dom php-xml來確保

您可能需要重新啟動 PHP FPM 或 Apache 才能使更改生效 - 例如。 systemctl restart php-fpmsystemctl restart apache2 (或systemctl restart httpd

是的,必須在 ec2-user 的膩子上使用命令“sudo yum install php-dom php-xml”安裝“php-dom php-xml”。 我使用命令sudo yum install php-dom php-xml 安裝它對我來說就像一個魅力。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM