summaryrefslogtreecommitdiffstats
path: root/Applications/phpmyadmin/config.inc.php
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-23 05:11:51 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-23 05:11:51 +0100
commitd668184dc124aa72b06799c07b6ab5bddb1799f3 (patch)
treeec7f79628e5da45c86c29a4c0bf7cc51d5107442 /Applications/phpmyadmin/config.inc.php
parentac061ade298a8cf3a50b801ed888a28d7869dea5 (diff)
downloadphpmyadmin-d668184dc124aa72b06799c07b6ab5bddb1799f3.tar.gz
phpmyadmin-d668184dc124aa72b06799c07b6ab5bddb1799f3.tar.bz2
phpmyadmin-d668184dc124aa72b06799c07b6ab5bddb1799f3.tar.xz
phpmyadmin-d668184dc124aa72b06799c07b6ab5bddb1799f3.zip
Extend configuration optionsands
Diffstat (limited to 'Applications/phpmyadmin/config.inc.php')
-rw-r--r--Applications/phpmyadmin/config.inc.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/Applications/phpmyadmin/config.inc.php b/Applications/phpmyadmin/config.inc.php
index 46d5e70..1f1288b 100644
--- a/Applications/phpmyadmin/config.inc.php
+++ b/Applications/phpmyadmin/config.inc.php
@@ -59,6 +59,34 @@ if(getenv('DB_SERVICE_USER') != '') {
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
}
+elseif(getenv('DB_SERVICE_HOST') != '') {
+ $i++;
+ $cfg['Servers'][$i]['extension'] = 'mysqli';
+ $cfg['Servers'][$i]['host'] = getenv('DB_SERVICE_HOST');
+ if (getenv('DB_SERVICE_PORT'))
+ $cfg['Servers'][$i]['port'] = getenv('DB_SERVICE_PORT');
+ else
+ $cfg['Servers'][$i]['port'] = 3306;
+
+ if (getenv('DB_SERVICE_CONTROL_USER')) {
+ $cfg['Servers'][$i]['controluser'] = getenv('DB_SERVICE_CONTROL_USER');
+ $cfg['Servers'][$i]['controlpass'] = getenv('DB_SERVICE_CONTROL_PASSWORD');
+ }
+}
+
+if(getenv('DB_EXTRA_HOSTS') != '') {
+ $list = explode(",", getenv('DB_EXTRA_HOSTS'));
+ foreach ($list as $item) {
+ $pair = explode(":", $item);
+ if (!$pair[1]) $pair[1] = 3306;
+
+ $i++;
+ $cfg['Servers'][$i]['extension'] = 'mysqli';
+ $cfg['Servers'][$i]['host'] = $pair[0];
+ $cfg['Servers'][$i]['port'] = $pair[1];
+ }
+}
+
/**
* phpMyAdmin configuration storage settings.
*/