wallabag: [error] v2 nginx hosting error

Issue details

cannot run app under nginx. Got an error 500 ` 2016/04/01 10:21:44 [error] 2269#0: *24659 FastCGI sent in stderr: “PHP message: PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity "/var/www/wallabag2/vendor/friendsofsymfony/user-bundle/Resources/config/doctrine-mapping/User.orm.xml" in /var/www/wallabag2/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php on line 814 PHP message: PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity "/var/www/wallabag2/vendor/friendsofsymfony/user-bundle/Resources/config/doctrine-mapping/User.orm.xml" in /var/www/wallabag2/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php on line 814 PHP message: PHP Fatal error: Uncaught exception ‘Doctrine\Common\Persistence\Mapping\MappingException’ with message ‘Invalid mapping file ‘FOS.UserBundle.Model.User.orm.xml’ for class ‘FOS\UserBundle\Model\User’.’ in /var/www/wallabag2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php:86 Stack trace: #0 /var/www/wallabag2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php(117): Doctrine\Common\Persistence\Mapping\MappingException::invalidMappingFile(‘FOS\UserBundle.…’, ‘FOS.UserBundle…’) #1 /var/www/wallabag2/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php(58): Doctrine\Common\Persistence\Mapping\Driver\FileDriver->getElement(‘FOS\UserBundle.…’) #2 /var/www/wallabag2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php(102): Doctrine\ORM\Mapping\Driver\XmlDriver->loadMetadataForClass(‘FOS\UserBundle.…’, Object(Doctrine\ORM\Mapping\ClassMetadata)) #3 /var/www/wallab” while reading response header from upstream, client: 78.47.230.141, server: wallabag2.wst174.ru, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”, host: “wallabag2.wst174.ru”

`

Environment

-host v2 in /var/www/wallabag2

  • nginx is set up like shown in documentatoin
  • wallabag version: v2 git 14044c9
  • installed via composer install
  • Last wallabag version that did not exhibit the issue (if applicable): none
  • php version:
  • OS:debian 8 armhf
  • hosting: dedicated, nginx 1.9.12
  • storage system MySQL

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (16 by maintainers)

Most upvoted comments

Summary

  • Error with mapping/User.orm.xml for nginx hosting resolves by patching XmlDriver.php $xmlData = file_get_contents($file); $xmlElement = simplexml_load_string($xmlData);
  • for non-SQLite databases parameter database_path must be empty

Same issue as well, fixed with patching and empty database_path string.