mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update config.inc.php
This commit is contained in:
parent
4c5912ce22
commit
447df59ecf
@ -25,10 +25,21 @@ if (check_file_access('/etc/phpmyadmin/config-db.php')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($dbname)) {
|
if (!empty($dbname)) {
|
||||||
/* Authentication type */
|
$serverPort = $_SERVER['SERVER_PORT'];
|
||||||
|
// AUTOLOGIN FROM OPENPANEL UI
|
||||||
|
if ($serverPort != 80 && $serverPort != 443) {
|
||||||
|
error_log("Using Single Sign-On (SSO) for connections from OpenPanel: $clientIp");
|
||||||
$cfg['Servers'][$i]['auth_type'] = 'signon';
|
$cfg['Servers'][$i]['auth_type'] = 'signon';
|
||||||
$cfg['Servers'][$i]['SignonSession'] = 'OPENPANEL_PHPMYADMIN';
|
$cfg['Servers'][$i]['SignonSession'] = 'OPENPANEL_PHPMYADMIN';
|
||||||
$cfg['Servers'][$i]['SignonURL'] = 'pma.php';
|
$cfg['Servers'][$i]['SignonURL'] = 'pma.php';
|
||||||
|
// LOGIN FORM ON DOMAIN/phpmyadmin
|
||||||
|
} else {
|
||||||
|
error_log("Using cookie authentication for connection via domain name");
|
||||||
|
$cfg['Servers'][$i]['auth_type'] = 'cookie';
|
||||||
|
$cfg['Servers'][$i]['user'] = '';
|
||||||
|
$cfg['Servers'][$i]['password'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
/* Server parameters */
|
/* Server parameters */
|
||||||
if (empty($dbserver)) $dbserver = 'localhost';
|
if (empty($dbserver)) $dbserver = 'localhost';
|
||||||
$cfg['Servers'][$i]['host'] = $dbserver;
|
$cfg['Servers'][$i]['host'] = $dbserver;
|
||||||
@ -68,15 +79,13 @@ $cfg['ShowChgPassword'] = false;
|
|||||||
$cfg['ShowCreateDb'] = false;
|
$cfg['ShowCreateDb'] = false;
|
||||||
$cfg['SuggestDBName'] = false;
|
$cfg['SuggestDBName'] = false;
|
||||||
$cfg['AllowUserDropDatabase'] = false;
|
$cfg['AllowUserDropDatabase'] = false;
|
||||||
$cfg['AllowUserDropUser'] = false;
|
|
||||||
$cfg['PmaNoRelation_DisableWarning'] = true;
|
$cfg['PmaNoRelation_DisableWarning'] = true;
|
||||||
$cfg['UploadDir'] = '';
|
$cfg['UploadDir'] = '';
|
||||||
$cfg['SaveDir'] = '';
|
$cfg['SaveDir'] = '';
|
||||||
$cfg['ShowDatabasesNavigationAsTree'] = false;
|
$cfg['ShowDatabasesNavigationAsTree'] = false;
|
||||||
|
|
||||||
/* Support additional configurations */
|
/* Support additional configurations */
|
||||||
foreach (glob('/etc/phpmyadmin/conf.d/*.php') as $filename)
|
foreach (glob('/etc/phpmyadmin/conf.d/*.php') as $filename) {
|
||||||
{
|
|
||||||
include($filename);
|
include($filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user