Setting up Shopware 6 fails with PHP XML error

Marvin Klar asked:

Currently setting up Shopware 6 Community Edition ( https://www.shopware.com/de/download/ ) on my Ubuntu machine.

I followed these steps: https://docs.shopware.com/de/shopware-6-de/erste-schritte/shopware-6-installieren

I also have all the requirements: https://docs.shopware.com/de/shopware-6-de/erste-schritte/systemvoraussetzungen

My machine:

  • Ubuntu 18.04.3 LTS
  • PHP 7.2.19-0ubuntu0.18.04.2
  • Apache 2.4.29

I created the apache2 configuration and followed the setup, including the setup of the database. Everything went fine. But when I try to access the page [myshopdomain.tld]/admin I only receive a blank page with a 500 internal server error in the developer console, showing the GET requests (it’s not logged like a javascript debug message).
When looking in the error log, configured in the apache2 configuration, I see the following:

[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

Does anyone know how to fix this error?

My answer:


Make sure you have installed the PHP XML extension, on your distribution named php7.2-xml. If that doesn’t solve the problem, you will almost certainly need help from the Shopware developers.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.