目前正在设置 Shopware 6 社区版 (https://www.shopware.com/de/download/) 在我的 Ubuntu 机器上。
我遵循以下步骤:https://docs.shopware.com/de/shopware-6-de/erste-schritte/shopware-6-installieren
我也有所有要求:https://docs.shopware.com/de/shopware-6-de/erste-schritte/systemvoraussetzungen
我的机器:
- Ubuntu 18.04.3 LTS
- PHP 7.2.19-0ubuntu0.18.04.2
- Apache 2.4.29
我创建了 apache2 配置并遵循了设置,包括数据库的设置。一切顺利。但是当我尝试访问页面 [myshopdomain.tld]/admin 时,我只在开发人员控制台中收到一个空白页,其中包含 500 内部服务器错误,显示 GET 请求(它没有像 javascript 调试消息那样记录下来)。当查看在 apache2 配置中配置的错误日志时,我看到以下内容:
[authz_core:debug] [pid 10073] mod_authz_core.c(809): [client XXX.XXX.XXX.XXX:XXXXX] AH01626: authorization result of Require all granted: granted
[authz_core:debug] [pid 10073] mod_authz_core.c(809): [client XXX.XXX.XXX.XXX:XXXXX] AH01626: authorization result of <RequireAny>: granted
[authz_core:debug] [pid 10073] mod_authz_core.c(809): [client XXX.XXX.XXX.XXX:XXXXX] AH01626: authorization result of Require all granted: granted
[authz_core:debug] [pid 10073] mod_authz_core.c(809): [client XXX.XXX.XXX.XXX:XXXXX] AH01626: authorization result of <RequireAny>: granted
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP Notice: Undefined property: DOMDocument::$documentElement in /path/to/my/webroot/htdocs/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php on line 615
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP Stack trace:
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 1. {main}() /path/to/my/webroot/htdocs/public/index.php:0
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 2. Shopware\\Production\\Kernel->boot() /path/to/my/webroot/htdocs/public/index.php:66
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 3. Shopware\\Production\\Kernel->initializeContainer() /path/to/my/webroot/htdocs/vendor/shopware/core/Kernel.php:125
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 4. Shopware\\Production\\Kernel->buildContainer() /path/to/my/webroot/htdocs/vendor/symfony/http-kernel/Kernel.php:549
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 5. Shopware\\Production\\Kernel->prepareContainer() /path/to/my/webroot/htdocs/vendor/symfony/http-kernel/Kernel.php:656
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 6. Shopware\\Core\\Framework\\Framework->build() /path/to/my/webroot/htdocs/vendor/symfony/http-kernel/Kernel.php:684
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 7. Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader->load() /path/to/my/webroot/htdocs/vendor/shopware/core/Framework/Framework.php:47
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 8. Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader->parseFileToDOM() /path/to/my/webroot/htdocs/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php:46
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 9. Symfony\\Component\\Config\\Util\\XmlUtils::loadFile() /path/to/my/webroot/htdocs/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php:411
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 10. Symfony\\Component\\Config\\Util\\XmlUtils::parse() /path/to/my/webroot/htdocs/vendor/symfony/config/Util/XmlUtils.php:131
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP 11. Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader->validateSchema() /path/to/my/webroot/htdocs/vendor/symfony/config/Util/XmlUtils.php:83
[php7:notice] [pid 10073] [client XXX.XXX.XXX.XXX:XXXXX] PHP Fatal error: Uncaught Error: Call to a member function getAttributeNS() on null in /path/to/my/webroot/htdocs/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php:615\nStack trace:\n#0 /path/to/my/webroot/htdocs/vendor/symfony/config/Util/XmlUtils.php(83): Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader->validateSchema(Object(DOMDocument), false)\n#1 /path/to/my/webroot/htdocs/vendor/symfony/config/Util/XmlUtils.php(131): Symfony\\Component\\Config\\Util\\XmlUtils::parse('<?xml version="...', Array)\n#2 /path/to/my/webroot/htdocs/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php(411): Symfony\\Component\\Config\\Util\\XmlUtils::loadFile('/path/to/my/webroot...', Array)\n#3 /path/to/my/webroot/htdocs/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php(46): Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader->parseFileToDOM('/path/to/my/webroot...')\n#4 /path/to/my/webroot/htdocs/vendor/shopware/core in /path/to/my/webroot/htdocs/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php on line 615
有人知道如何修复这个错误吗?
答案1
确保你已经在你的发行版上安装了 PHP XML 扩展,名为php7.2-xml
。如果这不能解决问题,您几乎肯定需要 Shopware 开发人员的帮助。