|
27 | 27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 | */ |
29 | 29 |
|
30 | | -Header('Pragma: no-cache'); |
31 | | -Header('Cache-Control: no-store, no-cache, max-age=0, must-revalidate'); |
32 | | -Header('Content-Type: text/html'); |
33 | | - |
| 30 | +header('Pragma: no-cache'); |
| 31 | +header('Cache-Control: no-store, no-cache, max-age=0, must-revalidate'); |
| 32 | +header('Content-Type: text/html'); |
| 33 | +//* TODO: Js caching - pedro |
34 | 34 |
|
35 | 35 | //** Key paramaters |
36 | 36 | $conf['app_title'] = 'ISPConfig'; |
37 | 37 | $conf['app_version'] = '3.0.0'; |
38 | 38 | $conf['modules_available'] = 'admin,mail,sites,monitor,client,dns'; |
39 | 39 |
|
40 | 40 |
|
41 | | -//** Database Settings |
42 | | -$conf['db_type'] = 'mysql'; |
43 | | -$conf['db_host'] = 'localhost'; |
44 | | -$conf['db_database'] = 'ispconfig3'; |
45 | | -$conf['db_user'] = 'root'; |
46 | | -$conf['db_password'] = ''; |
| 41 | +//** Future Code - pedro comments |
| 42 | +/* Database connection |
| 43 | + The only time its needed is to connectm otherwise it not needed as |
| 44 | + variables aronf the application. Connected and done. |
| 45 | + Prefered is an array as $DB in capitals, ie |
| 46 | + $DB['host'] = 'type'; |
| 47 | + $DB['host'] = 'ip'; |
| 48 | + $DB['user'] = 'me'; |
| 49 | + $DB['password'] = 'secret'; |
| 50 | + $DB['database'] = 'persistent_data_stash'; |
| 51 | + |
| 52 | + The connection paramaters are all contained within one array structure |
| 53 | + With this array structure the connection can be passed around, to functions |
| 54 | + However it can also leak. and be destroyed eg |
| 55 | + $db->connect($DB); |
| 56 | + unset($DB); // only the paranoid survive |
| 57 | + |
| 58 | + Also there is a scenario where we are devloping and using this file |
| 59 | + and the database paramaters might leak. |
| 60 | + To resolve this there is a file called db_local.php.skel which is not detected |
| 61 | + rename this to db_local.php and edit the paramaters |
| 62 | + |
| 63 | + $DB['type'] = 'mysql'; |
| 64 | + $DB['host'] = 'localhost'; |
| 65 | + $DB['database'] = 'ispconfig3'; |
| 66 | + $DB['user'] = 'root'; |
| 67 | + $DB['password'] = ''; |
| 68 | +
|
| 69 | + |
| 70 | +*/ |
| 71 | + |
| 72 | +//** Detect for local database setting or set and load default params |
| 73 | +if( file_exists('db_local.php') ){ |
| 74 | + require_once('db_local.php'); |
| 75 | + $conf['db_type'] = $DB['type']; |
| 76 | + $conf['db_host'] = $DB['host']; |
| 77 | + $conf['db_database'] = $DB['database']; |
| 78 | + $conf['db_user'] = $DB['user']; |
| 79 | + $conf['db_password'] = $DB['password']; |
| 80 | +}else{ |
| 81 | + //** Database Settings |
| 82 | + $conf['db_type'] = 'mysql'; |
| 83 | + $conf['db_host'] = 'localhost'; |
| 84 | + $conf['db_database'] = 'ispconfig3'; |
| 85 | + $conf['db_user'] = 'root'; |
| 86 | + $conf['db_password'] = ''; |
| 87 | +} |
47 | 88 |
|
48 | 89 |
|
49 | 90 | //** Path Settings (Do not change!) |
50 | | -$conf["rootpath"] = substr(dirname(__FILE__),0,-4); |
51 | | -$conf["fs_div"] = '/'; // File system divider, \\ on windows and / on linux and unix |
52 | | -$conf["classpath"] = $conf['rootpath'].$conf['fs_div'].'lib'.$conf['fs_div'].'classes'; |
53 | | -$conf["temppath"] = $conf['rootpath'].$conf['fs_div'].'temp'; |
| 91 | +$conf['rootpath'] = substr(dirname(__FILE__),0,-4); |
| 92 | +$conf['fs_div'] = '/'; // File system divider, \\ on windows and / on linux and unix |
| 93 | +$conf['classpath'] = $conf['rootpath'].$conf['fs_div'].'lib'.$conf['fs_div'].'classes'; |
| 94 | +$conf['temppath'] = $conf['rootpath'].$conf['fs_div'].'temp'; |
54 | 95 |
|
55 | 96 |
|
56 | | -define('DIR_TRENNER',$conf['fs_div']); |
57 | | -define('SERVER_ROOT',$conf['rootpath']); |
58 | | -define('INCLUDE_ROOT',SERVER_ROOT.DIR_TRENNER.'lib'); |
59 | | -define('CLASSES_ROOT',INCLUDE_ROOT.DIR_TRENNER.'classes'); |
| 97 | +define('DIR_TRENNER', $conf['fs_div']); |
| 98 | +define('SERVER_ROOT', $conf['rootpath']); |
| 99 | +define('INCLUDE_ROOT', SERVER_ROOT.DIR_TRENNER.'lib'); |
| 100 | +define('CLASSES_ROOT', INCLUDE_ROOT.DIR_TRENNER.'classes'); |
60 | 101 |
|
| 102 | +/* pedro notes ? this stuff is REALLY not necessay */ |
| 103 | +/* |
61 | 104 | define('DB_TYPE', $conf['db_type']); |
62 | 105 | define('DB_HOST', $conf['db_host']); |
63 | 106 | define('DB_DATABASE',$conf['db_database']); |
64 | 107 | define('DB_USER', $conf['db_user']); |
65 | 108 | define('DB_PASSWORD', $conf['db_password']); |
66 | | - |
| 109 | +*/ |
67 | 110 |
|
68 | 111 | //** External programs |
69 | 112 | //$conf["programs"]["convert"] = "/usr/bin/convert"; |
|
0 commit comments