tbrehm
2008-12-27 b96784d7c002ad125ceba27e2749c2b3713bec0d
commit | author | age
9200ad 1 <?php
436ed8 2
9200ad 3 /*
fb66b7 4 Copyright (c) 2007 - 2008, Till Brehm, projektfarm Gmbh
9200ad 5 All rights reserved.
T 6
7 Redistribution and use in source and binary forms, with or without modification,
8 are permitted provided that the following conditions are met:
9
10     * Redistributions of source code must retain the above copyright notice,
11       this list of conditions and the following disclaimer.
12     * Redistributions in binary form must reproduce the above copyright notice,
13       this list of conditions and the following disclaimer in the documentation
14       and/or other materials provided with the distribution.
15     * Neither the name of ISPConfig nor the names of its contributors
16       may be used to endorse or promote products derived from this software without
17       specific prior written permission.
18
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
008770 31 //** Web-only
O 32 if( !empty($_SERVER['DOCUMENT_ROOT']) ) {
9200ad 33
008770 34     Header("Pragma: no-cache");
O 35     Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
00dfba 36     Header("Content-Type: text/html; charset=utf-8");
fb66b7 37     
T 38     //** Set a few php.ini values
008770 39     ini_set('register_globals',0);
fb66b7 40     ini_set('magic_quotes_gpc', 0);
T 41     
42     if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
43         die('Internal Error: GLOBALS override attempt detected');
44         exit;
45     }
008770 46 }
9200ad 47
fb66b7 48 //** Set a few php.ini values
T 49 set_magic_quotes_runtime(0);
50 if(isset($app)) unset($app);
51 if(isset($conf)) unset($conf);
52
53
0abf30 54 //** SVN Revision
R 55 $svn_revision = '$Revision$';
cd9698 56 $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
54fb59 57
00dfba 58 //** Application
008770 59 define('ISPC_APP_TITLE', 'ISPConfig');
6080be 60 define('ISPC_APP_VERSION', '3.0.0.8');
b5a23a 61
008770 62
00dfba 63 //** Database
R 64 $conf["db_type"] = 'mysql';
65 $conf["db_host"] = '{mysql_server_host}';
66 $conf["db_database"] = '{mysql_server_database}';
67 $conf["db_user"] = '{mysql_server_ispconfig_user}';
68 $conf["db_password"] = '{mysql_server_ispconfig_password}';
69 $conf["db_charset"] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
9200ad 70
T 71 define("DB_TYPE",$conf["db_type"]);
72 define("DB_HOST",$conf["db_host"]);
73 define("DB_DATABASE",$conf["db_database"]);
74 define("DB_USER",$conf["db_user"]);
75 define("DB_PASSWORD",$conf["db_password"]);
00dfba 76 define("DB_CHARSET",$conf["db_charset"]);
9200ad 77
ba747c 78
a78dfc 79 //** Database settings for the master DB. This setting is only used in multiserver setups
T 80 $conf["dbmaster_type"]            = 'mysql';
81 $conf["dbmaster_host"]            = '{mysql_master_server_host}';
82 $conf["dbmaster_database"]        = '{mysql_master_server_database}';
83 $conf["dbmaster_user"]            = '{mysql_master_server_ispconfig_user}';
84 $conf["dbmaster_password"]        = '{mysql_master_server_ispconfig_password}';
85
86
00dfba 87 //** Paths
R 88 define('ISPC_ROOT_PATH', realpath(dirname(__FILE__).'/../')); // The main ROOT is the parent directory to this file, ie Interface/. NO trailing slashes.
89 define('ISPC_LIB_PATH', ISPC_ROOT_PATH.'/lib');
90 define('ISPC_CLASS_PATH', ISPC_ROOT_PATH.'/lib/classes');
91 define('ISPC_WEB_PATH', ISPC_ROOT_PATH.'/web');
92 define('ISPC_THEMES_PATH', ISPC_ROOT_PATH.'/web/themes');
93 define('ISPC_WEB_TEMP_PATH', ISPC_WEB_PATH.'/temp'); // Path for downloads, accessible via browser
94 define('ISPC_CACHE_PATH', ISPC_ROOT_PATH.'/cache');
ba747c 95
00dfba 96 //** Paths (Do not change!)
R 97 $conf["rootpath"] = substr(dirname(__FILE__),0,-4);
98 $conf["fs_div"] = "/"; // File system divider, "\\" on windows and "/"" on linux and unix
99 $conf["classpath"] = $conf["rootpath"].$conf["fs_div"]."lib".$conf["fs_div"]."classes";
100 $conf["temppath"] = $conf["rootpath"].$conf["fs_div"]."temp";
48ced1 101
00dfba 102 define("FS_DIV",$conf["fs_div"]);
R 103 define("SERVER_ROOT",$conf["rootpath"]);
104 define("INCLUDE_ROOT",SERVER_ROOT.FS_DIV."lib");
105 define("CLASSES_ROOT",INCLUDE_ROOT.FS_DIV."classes");
106
107
108 //** Server
109 $conf['app_title'] = ISPC_APP_TITLE;
110 $conf['app_version'] = ISPC_APP_VERSION;
b96784 111 $conf['app_link'] = 'http://www.ispconfig.org/';
00dfba 112 $conf['modules_available'] = 'admin,mail,sites,monitor,client,dns,help';
R 113 $conf["server_id"] = "{server_id}";
114
115
116 //** Interface
117 define('ISPC_INTERFACE_MODULES_ENABLED', 'mail,sites,dns,tools');
118
119
120 //** Logging
121 $conf["log_file"] = '/var/log/ispconfig/ispconfig.log';
122 $conf["log_priority"] = {ispconfig_log_priority}; // 0 = Debug, 1 = Warning, 2 = Error
123
124
125 //** Allow software package installations
48ced1 126 $conf['software_updates_enabled'] = false;
T 127
128
00dfba 129 //** Themes
R 130 $conf["theme"] = 'default';
131 $conf["html_content_encoding"] = 'utf-8'; // example: utf-8, iso-8859-1, ...
132 $conf["logo"] = 'themes/default/images/ispc_logo.png';
845c3e 133
9200ad 134
00dfba 135 //** Default Language
R 136 $conf["language"] = 'en';
9200ad 137
T 138
00dfba 139 //** Misc.
R 140 $conf["interface_logout_url"] = ""; // example: http://www.domain.tld/
9200ad 141
00dfba 142
R 143 //** Auto Load Modules
144 $conf["start_db"] = true;
145 $conf["start_session"] = true;
146
147
148 //** Constants
ba747c 149 define("LOGLEVEL_DEBUG",0);
T 150 define("LOGLEVEL_WARN",1);
151 define("LOGLEVEL_ERROR",2);
152
a78dfc 153 ?>