[core] Remove config data from session as it brings chicken-egg problem.
Configuration data stores PmaAbsoluteUri, which should be accessible before initiating session. Otherwise there is no way to make PmaAbsoluteUri work. PmaAbsoluteUri is needed at least for reverse proxy setups, for example http webserver running behind https proxy.
This commit is contained in:
@@ -31,7 +31,7 @@ require './libraries/header_http.inc.php';
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>phpMyAdmin <?php echo $_SESSION['PMA_Config']->get('PMA_VERSION'); ?> setup</title>
|
||||
<title>phpMyAdmin <?php echo $GLOBALS['PMA_Config']->get('PMA_VERSION'); ?> setup</title>
|
||||
<link href="../favicon.ico" rel="icon" type="image/x-icon" />
|
||||
<link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
||||
<link href="styles.css" rel="stylesheet" type="text/css" />
|
||||
@@ -40,7 +40,7 @@ require './libraries/header_http.inc.php';
|
||||
<script type="text/javascript" src="scripts.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1><span class="blue">php</span><span class="orange">MyAdmin</span> <?php echo $_SESSION['PMA_Config']->get('PMA_VERSION'); ?> setup</h1>
|
||||
<h1><span class="blue">php</span><span class="orange">MyAdmin</span> <?php echo $GLOBALS['PMA_Config']->get('PMA_VERSION'); ?> setup</h1>
|
||||
<div id="menu">
|
||||
<?php
|
||||
require './setup/frames/menu.inc.php';
|
||||
|
@@ -277,7 +277,7 @@ class ConfigFile
|
||||
. '/*' . $crlf
|
||||
. ' * Generated configuration file' . $crlf
|
||||
. ' * Generated by: phpMyAdmin '
|
||||
. $_SESSION['PMA_Config']->get('PMA_VERSION')
|
||||
. $GLOBALS['PMA_Config']->get('PMA_VERSION')
|
||||
. ' setup script by Piotr Przybylski <piotrprz@gmail.com>' . $crlf
|
||||
. ' * Date: ' . date(DATE_RFC1123) . $crlf
|
||||
. ' */' . $crlf . $crlf;
|
||||
|
@@ -24,7 +24,7 @@ require_once './setup/lib/ConfigFile.class.php';
|
||||
restore_error_handler();
|
||||
|
||||
// Save current language in a cookie, required since we use PMA_MINIMUM_COMMON
|
||||
PMA_setCookie('pma_lang', $GLOBALS['lang']);
|
||||
$GLOBALS['PMA_Config']->setCookie('pma_lang', $GLOBALS['lang']);
|
||||
|
||||
if (!isset($_SESSION['ConfigFile'])) {
|
||||
$_SESSION['ConfigFile'] = array();
|
||||
|
@@ -153,7 +153,7 @@ function PMA_version_check()
|
||||
return;
|
||||
}
|
||||
|
||||
$version_local = version_to_int($_SESSION['PMA_Config']->get('PMA_VERSION'));
|
||||
$version_local = version_to_int($GLOBALS['PMA_Config']->get('PMA_VERSION'));
|
||||
if ($version_local === false) {
|
||||
messages_set('error', $message_id, 'VersionCheck',
|
||||
PMA_lang('VersionCheckUnparsable'));
|
||||
|
Reference in New Issue
Block a user