From 7fa95d3e43fc33093828e1ea709a25a13cb01cb6 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 17 Jul 2019 17:20:09 +0200 Subject: [PATCH] PHP-FPM --- pandora_console/include/functions.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 9232854317..aa9774ecbb 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -5413,3 +5413,27 @@ function get_help_info($section_name) // hd($result); return $result; } + + +if (!function_exists('getallheaders')) { + + + /** + * Fix for php-fpm + * + * @return array + */ + function getallheaders() + { + $headers = []; + foreach ($_SERVER as $name => $value) { + if (substr($name, 0, 5) == 'HTTP_') { + $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; + } + } + + return $headers; + } + + +}