performConfigChecks();
//
// Check whether we can read/write configuration
//
$config_readable = false;
$config_writable = false;
$config_exists = false;
PMA_checkConfigRw($config_readable, $config_writable, $config_exists);
if (!$config_writable || !$config_readable) {
PMA_messagesSet(
'error', 'config_rw', __('Cannot load or save configuration'),
PMA_sanitize(
__(
'Please create web server writable folder [em]config[/em] in '
. 'phpMyAdmin top level directory as described in '
. '[doc@setup_script]documentation[/doc]. Otherwise you will be '
. 'only able to download or display it.'
)
)
);
}
//
// Check https connection
//
$is_https = !empty($_SERVER['HTTPS'])
&& /*overload*/mb_strtolower($_SERVER['HTTPS']) == 'on';
if (!$is_https) {
$text = __(
'You are not using a secure connection; all data (including potentially '
. 'sensitive information, like passwords) is transferred unencrypted!'
);
if (!empty($_SERVER['REQUEST_URI']) && !empty($_SERVER['HTTP_HOST'])) {
$link = htmlspecialchars(
'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']
);
$text .= ' ';
$text .= PMA_sanitize(
sprintf(
__(
'If your server is also configured to accept HTTPS requests '
. 'follow [a@%s]this link[/a] to use a secure connection.'
),
$link
)
);
}
PMA_messagesSet('notice', 'no_https', __('Insecure connection'), $text);
}
echo '
';
// Check for done action info and set notice message if present
switch ($action_done) {
case 'config_saved':
/* Use uniqid to display this message every time configuration is saved */
PMA_messagesSet(
'notice', uniqid('config_saved'), __('Configuration saved.'),
PMA_sanitize(
__(
'Configuration saved to file /etc/phpmyadmin/config.inc.php.'
)
)
);
break;
default:
break;
}
echo '