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

[config] load fails if libxml_disable_entity_loader is globally set to true #18876

Closed
krichprollsch opened this issue May 25, 2016 · 2 comments
Closed

Comments

@krichprollsch
Copy link
Contributor

If a libxml_disable_entity_loader is set to true somewhere, the xml parsing fails after a cache directory deletion with the error:

[WARNING 1549] failed to load external entity "file:////home/pierre/project/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:////home/pierre/project/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 /home/pierre/project/web/ - line 5, column 0)

You can reproduce with a fresh install of symfony and a bundle using xml config.
Add a libxml_disable_entity_loader(true); before the kernel boot and remove the cache directory.

The issue exists only via a web request, the console cli is not impacted.

Im not sure how to fix the problem. We could force libxml_disable_entity_loader(false) before the xml validation test [1] as it appears to be required, and reset the value after.

@xabbuh
Copy link
Member

xabbuh commented May 29, 2016

@krichprollsch Can you confirm that the fix from #18908 fixes your issue?

@krichprollsch
Copy link
Contributor Author

yes it is 👍

nicolas-grekas added a commit that referenced this issue May 30, 2016
…ty loaders (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] force enabling the external XML entity loaders

| Q             | A
| ------------- | ---
| Branch?       | 2.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18876
| License       | MIT
| Doc PR        |

Commits
-------

142b1a4 force enabling the external XML entity loaders
fabpot added a commit that referenced this issue Jun 13, 2016
…ty loaders (xabbuh)

This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] force enabling the external XML entity loaders

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18876, #18908
| License       | MIT
| Doc PR        |

Commits
-------

12b5509 force enabling the external XML entity loaders
@fabpot fabpot closed this as completed Jun 13, 2016
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

5 participants