From fe816076fc5a2b3b1e497b8c51c76430311eea2c Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Sun, 16 Oct 2016 17:48:41 +0200 Subject: [PATCH] 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. --- main.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.php b/main.php index 3c62c9514..e9fa011ee 100644 --- a/main.php +++ b/main.php @@ -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 */