root/alternc/tags/0.9.7/etc/alternc/phpmyadmin.inc.php

Revision 2001, 1.3 kB (checked in by anarcat, 1 year ago)

don't hardcode the mysql host, rely on alternc configuration, which resolves the problem of configuring phpmyadmin for remote mysqls

Line 
1 <?php
2
3 /**
4  * Special phpmyadmin configuration for AlternC
5  *
6  * We setup two new servers:
7  *
8  * i: a server with a hardcoded username/password corresponding to the
9  * one setup in the AlternC panels
10  *
11  * i+1: a regular server with a cookie-based auth
12  *
13  * the content of this file will be included in the
14  * /etc/phpmyadmin/config.inc.php
15  */
16
17 include_once('/var/alternc/bureau/class/local.php');
18
19 $i = 1;
20
21 $cfg['Servers'][$i]['host']          = $L_MYSQL_HOST; // MySQL hostname or IP address
22 $cfg['Servers'][$i]['connect_type']  = 'tcp';    // How to connect to MySQL server ('tcp' or 'socket')
23 $cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
24 $cfg['Servers'][$i]['user']          = $_COOKIE["REMOTE_USER"];    ;      // MySQL user
25 $cfg['Servers'][$i]['password']      = $_COOKIE["REMOTE_PASSWORD"]; ;          // MySQL password (only needed
26 //                                                    // with 'config' auth_type)
27
28 $i++;
29
30 // Uncomment to override the default configuration
31 $cfg['Servers'][$i]['host']          = $L_MYSQL_HOST; // MySQL hostname or IP address
32 $cfg['Servers'][$i]['connect_type']  = 'tcp';    // How to connect to MySQL server ('tcp' or 'socket')
33 $cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (config, http or cookie based)?
34
35 ?>
36
Note: See TracBrowser for help on using the browser.