8000 Weird error on GAE environment php sdk with Symfony · Issue #9483 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Weird error on GAE environment php sdk with Symfony #9483

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

Closed
cordoval opened this issue Nov 9, 2013 · 4 comments
Closed

Weird error on GAE environment php sdk with Symfony #9483

cordoval opened this issue Nov 9, 2013 · 4 comments

Comments

@cordoval
Copy link
Contributor
cordoval commented Nov 9, 2013
InvalidArgumentException: [WARNING 1549] failed to load external entity "file:////Users/cordoval/Sites/gae/symfony-standard/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd" (in n/a - line 0, column 0)
[WARNING 3084] Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'file:////Users/cordoval/Sites/gae/symfony-standard/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd'. Skipping the import. (in in_memory_buffer - line 8, column 0)
[ERROR 1845] Element '{http://symfony.com/schema/dic/services}container': No matching global declaration available for the validation root. (in /Users/cordoval/Sites/gae/symfony-standard/web/ - line 5, column 0)
@ghost
Copy link
ghost commented Nov 16, 2013

I'm having the same error. Funny part is that it is not always there, but once it is there, it won't go away until I restart the server. Issue is only in dev mode.

I'm not running on a GAE environment though. Only Apache 2.4, PHP 5.6 (with xdebug), MySQL 5.6, Symfony 2.3.6 / 2.3.7 / 2.4-beta2.

@cordoval
Copy link
Contributor Author

this is a separate error and it has to do with the php and libs the GAE devkit uses, it is just messed up
but in production it does not give any problems, probably one of the forbidden functions is used and then it messes things up and we end with cryptic errors, i am working on things for GAE

@romainneutron
Copy link
Contributor

I've submitted a PR in #10493 that should solve this issue, can you have a look?

fabpot added a commit that referenced this issue Mar 26, 2014
…tity_loader usage (romainneutron)

This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Fix libxml_use_internal_errors and libxml_disable_entity_loader usage

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9731, #9483
| License       | MIT

This should fix #9731 and #9483 that seems to be triggered when `libxml_disable_entity_loader` has been called with `true` (see https://bugs.php.net/bug.php?id=62577)
As `libxml_disable_entity_loader` is non thread safe (see https://bugs.php.net/bug.php?id=64938) and as we have some calls that might leave the setting to `true`, I think the bug should be fixed.

I've checked the use of both `libxml_use_internal_errors` and `libxml_disable_entity_loader` among symfony code.

You can see I prefered to skip DomDocument::loadXML warnings using the `@` instead of using `LIBXML_NOERROR | LIBXML_NO_WARNING` because we can log these errors whereas libxml errors would be furtives.

 - [x] Check calls to DOMDocument::load
 - [x] Check calls to DOMDocument::loadXML
 - [x] Check calls to DOMDocument::loadHTML
 - [x] Check calls to DOMDocument::loadHTMLFile
 - [x] Add more tests

Commits
-------

489b8ae Fix libxml_use_internal_errors and libxml_disable_entity_loader usage
@fabpot fabpot closed this as completed Mar 26, 2014
@ccorliss
Copy link
Contributor

Check PR #11259 if you're still having issues with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0