我要在Amazon的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
答案 0 :(得分:1)
您需要安装php-dom
和php-xml
软件包,但是从您的PHP信息看来。您已经这样做了。如果您使用的是Debian或Ubuntu,则可以通过运行apt install php-dom php-xml
您可能需要重新启动PHP FPM或Apache才能使更改生效-例如。 systemctl restart php-fpm
或systemctl restart apache2
(或systemctl restart httpd
)
答案 1 :(得分:0)
是的,必须在 ec2-user 的腻子上使用命令“sudo yum install php-dom php-xml”安装“php-dom php-xml”。 我使用命令 sudo yum install php-dom php-xml 安装 它对我来说就像一种魅力。