BUG Make simplexml_load_file work on shared php-fpm

PHP #62577 [1] together with PHP #64938 [2] make simplexml_load_file()
fails when the "disable load external entities" flag is set.

As a workaround, manually enable the entity loader in the bootstrap
code. We are loading internal XML files after all, so no security
implications should arise.

[1] https://bugs.php.net/bug.php?id=62577
[2] https://bugs.php.net/bug.php?id=64938

Fix #6174.
This commit is contained in:
Nicola Fontana 2016-10-16 17:48:41 +02:00
parent 2a3768266e
commit fe816076fc
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ if(!empty($_SERVER['HTTP_X_ORIGINAL_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
}
// Enable the entity loader to be able to load XML in Zend_Locale_Data
libxml_disable_entity_loader(false);
/**
* Figure out the request URL
*/