Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean install on PostgreSQL failed #2529

Closed
skibbipl opened this Issue Nov 2, 2016 · 12 comments

Comments

Projects
None yet
3 participants
@skibbipl
Copy link
Contributor

skibbipl commented Nov 2, 2016

Issue details

I'm trying to install wallabag2 from scratch. No previous databases/users etc. I followed official documentation with installation but it failed miserably :( Here are logs form nginx and wallabag2:

nginx

2016/11/02 12:07:26 [error] 28768#28768: *200 FastCGI sent in stderr: "PHP message: PHP Warning:  simplexml_load_file(): I/O warning : failed to load external entity "<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                  http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

    <mapped-superclass name="FOS\UserBundle\Model\User">

        <field name="username" column="username" type="string" length="180" />

        <field name="usernameCanonical" column="username_canonical" type="string" length="180" unique="true" />

        <field name="email" column="email" type="string" length="180" /&gt...
PHP message: PHP Warning:  simplexml_load_file(): I/O warning : failed to load external entity "<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                  http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

    <mapped-superclass name="FOS\UserBundle\Model\User">

        <field name="username" column="username" type="string" length="180" />

        <field name="usernameCanonical" column="username_canonical" type="string" length="180" unique="true" />

        <field name="email" column=&

wallabag

[2016-11-02 12:07:26] request.CRITICAL: Uncaught PHP Exception Doctrine\Common\Persistence\Mapping\MappingException: "Invalid mapping file 'FOS.UserBundle.Model.User.orm.xml' for class 'FOS\UserBundle\Model\User'." at /var/www/wallabag2/
vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php line 86 {"exception":"[object] (Doctrine\\Common\\Persistence\\Mapping\\MappingException(code: 0): Invalid mapping file 'FOS.UserBundle.Model.User.orm.xm
l' for class 'FOS\\UserBundle\\Model\\User'. at /var/www/wallabag2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php:86)"} []
[2016-11-02 12:07:26] request.CRITICAL: Exception thrown when handling an exception (Doctrine\Common\Persistence\Mapping\MappingException: Invalid mapping file 'FOS.UserBundle.Model.User.orm.xml' for class 'FOS\UserBundle\Model\User'. at
 /var/www/wallabag2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php line 86) {"exception":"[object] (Doctrine\\Common\\Persistence\\Mapping\\MappingException(code: 0): Invalid mapping file 'FOS.UserBun
dle.Model.User.orm.xml' for class 'FOS\\UserBundle\\Model\\User'. at /var/www/wallabag2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php:86)"} []

Environment

  • wallabag version (or git revision) that exhibits the issue: 2.1.2
  • How did you install wallabag? Via git clone or by downloading the package? git clone
  • Last wallabag version that did not exhibit the issue (if applicable): N/A
  • php version: 7.0.12-1
  • OS: Debian Testing
  • type of hosting (shared or dedicated): dedicated
  • which storage system you choose at install (SQLite, MySQL/MariaDB or PostgreSQL): PostgreSQL

Steps to reproduce/test case

  1. Created user and database for wallabag in PostgreSQL.
  2. Clean installaltion according to official documentation.
  3. Apply workarounds from #1828
@j0k3r

This comment has been minimized.

Copy link
Member

j0k3r commented Nov 2, 2016

Looks like it's the same bug as #1828 (comment)
Can you confirm that your issue can be solved using the workaround?

@skibbipl

This comment has been minimized.

Copy link
Contributor Author

skibbipl commented Nov 2, 2016

I've already applied this workaround before posting this issue:
$xmlData = file_get_contents($file); $xmlElement = simplexml_load_string($xmlData);
It might be related, but before applying this fix I had different error messages in the log.

@j0k3r

This comment has been minimized.

Copy link
Member

j0k3r commented Nov 2, 2016

And does it solve your problem?

@skibbipl

This comment has been minimized.

Copy link
Contributor Author

skibbipl commented Nov 2, 2016

No, it doesn't solve the issue.

@j0k3r

This comment has been minimized.

Copy link
Member

j0k3r commented Nov 2, 2016

Did you remove the cache after your modification?
rm -rf var/cache/*

If it still don't work, you can add libxml_disable_entity_loader(false); on line 5 of web/app.php and try again?

@skibbipl

This comment has been minimized.

Copy link
Contributor Author

skibbipl commented Nov 2, 2016

Unfortunately none of the solutions helped :( I'm still getting the same errors.

@j0k3r

This comment has been minimized.

Copy link
Member

j0k3r commented Nov 2, 2016

I've no more idea ... 😞

@skibbipl

This comment has been minimized.

Copy link
Contributor Author

skibbipl commented Nov 2, 2016

Maybe I can provide some advanced debugging? I really want to use wallabag.

@nicosomb

This comment has been minimized.

Copy link
Member

nicosomb commented Nov 2, 2016

Hello @skibbipl!

Can you try if you have the same problem with SQLite or MySQL?

@skibbipl

This comment has been minimized.

Copy link
Contributor Author

skibbipl commented Nov 2, 2016

I need solution for PostgreSQL. But I can try with SQLite.

@skibbipl

This comment has been minimized.

Copy link
Contributor Author

skibbipl commented Nov 2, 2016

I can't even install wallabag2 with SQLite (with workaround applied):

> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
PHP Warning:  simplexml_load_file(): I/O warning : failed to load external entity "<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                  http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

    <mapped-superclass name="FOS\OAuthServerBundle\Entity\Client">
        <field name="randomId" column="random_id" type="string" />
        <field name="redirectUris" column="redirect_uris" type="array" />
        <field name="secret" column="secret" type="string" />
        <field name="allowedGrantTypes" column="allowed_grant_types" type="array" />
    </mapped-superclass>
</doctrine-mapping>
" in /var/www/wallabag2/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php on line 815


  [Doctrine\Common\Persistence\Mapping\MappingException]
  Invalid mapping file 'FOS.OAuthServerBundle.Entity.Client.orm.xml' for class 'FOS\OAuthServerBundle\Entity\Client'.
@skibbipl

This comment has been minimized.

Copy link
Contributor Author

skibbipl commented Nov 2, 2016

Issue resolved. I restored original XmlDriver.php and updated only web/app.php by adding libxml_disable_entity_loader(false);. This should definitely go to documentation.

@skibbipl skibbipl closed this Nov 2, 2016

@nicosomb nicosomb reopened this Nov 2, 2016

nicosomb added a commit that referenced this issue Nov 2, 2016

@nicosomb nicosomb added this to the 2.1.3 milestone Nov 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.