pull/121/head
midoks 3 years ago
parent 7c2bb1b8bd
commit 818ae2bfa5
  1. 6
      plugins/phpmyadmin/conf/config.inc.php
  2. 4
      plugins/phpmyadmin/index.py

@ -1,15 +1,15 @@
<?php
$cfg['blowfish_secret'] = 'd41d8cd98f00b204e9800998ecf8427e';
$cfg['blowfish_secret'] = '{$BLOWFISH_SECRET}';
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
// $cfg['Servers'][$i]['host'] = '127.0.0.1';
// $cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['socket'] = '/www/server/mysql/mysql.sock';
$cfg['Servers'][$i]['socket'] = '{$SERVER_PATH}/mysql/mysql.sock';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['TempDir'] = '/www/server/phpmyadmin/tmp';
$cfg['TempDir'] = '{$SERVER_PATH}/phpmyadmin/tmp';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>

@ -97,12 +97,16 @@ def getCachePhpVer():
def contentReplace(content):
service_path = mw.getServerDir()
php_ver = getCachePhpVer()
tmp = mw.execShell(
'cat /dev/urandom | head -n 32 | md5sum | head -c 16')
blowfish_secret = tmp[0].strip()
# print php_ver
php_conf_dir = mw.getServerDir() + '/web_conf/php/conf'
content = content.replace('{$ROOT_PATH}', mw.getRootDir())
content = content.replace('{$SERVER_PATH}', service_path)
content = content.replace('{$PHP_CONF_PATH}', php_conf_dir)
content = content.replace('{$PHP_VER}', php_ver)
content = content.replace('{$BLOWFISH_SECRET}', blowfish_secret)
return content

Loading…
Cancel
Save