From 169353d6ef25e2eab4a975551959582793c29982 Mon Sep 17 00:00:00 2001 From: f0o Date: Fri, 17 Apr 2015 16:53:31 +0000 Subject: [PATCH] Added nginx-hack to fix missing $_SERVER[PATH_INFO] --- html/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/html/index.php b/html/index.php index 62618323c7..9f2a847087 100755 --- a/html/index.php +++ b/html/index.php @@ -12,7 +12,11 @@ * */ -$_SERVER['PATH_INFO'] = !empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : (!empty($_SERVER['ORIG_PATH_INFO']) ? $_SERVER['ORIG_PATH_INFO'] : ''); +if( strstr($_SERVER['SERVER_SOFTWARE'],"nginx") ) { + $_SERVER['PATH_INFO'] = str_replace($_SERVER['PATH_TRANSLATED'].$_SERVER['PHP_SELF'],"",$_SERVER['ORIG_SCRIPT_FILENAME']); +} else { + $_SERVER['PATH_INFO'] = !empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : (!empty($_SERVER['ORIG_PATH_INFO']) ? $_SERVER['ORIG_PATH_INFO'] : ''); +} function logErrors($errno, $errstr, $errfile, $errline) { global $php_debug;