diff --git a/ChangeLog b/ChangeLog index 32164ac1d9..64c355e6b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog 4.0.7.0 (not yet released) - bug #3993 Sorting in database overview with statistics doesn't work +- bug Handle the situation where PHP_SELF is not set 4.0.6.0 (not yet released) - bug #4036 Call to undefined function mb_detect_encoding (clarify the doc) diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 9a2143ce43..17b3fb0f10 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -1271,7 +1271,13 @@ class PMA_Config // And finally the path could be already set from REQUEST_URI if (empty($url['path'])) { - $path = parse_url($GLOBALS['PMA_PHP_SELF']); + // we got a case with nginx + php-fpm where PHP_SELF + // was not set, so PMA_PHP_SELF was not set as well + if (isset($GLOBALS['PMA_PHP_SELF'])) { + $path = parse_url($GLOBALS['PMA_PHP_SELF']); + } else { + $path = parse_url(PMA_getenv('REQUEST_URI')); + } $url['path'] = $path['path']; } }