commit | author | age
|
56f1f4
|
1 |
<?php |
T |
2 |
/* |
cc6568
|
3 |
Copyright (c) 2007 - 2013, Till Brehm, projektfarm Gmbh |
56f1f4
|
4 |
All rights reserved. |
T |
5 |
|
|
6 |
Redistribution and use in source and binary forms, with or without modification, |
|
7 |
are permitted provided that the following conditions are met: |
|
8 |
|
|
9 |
* Redistributions of source code must retain the above copyright notice, |
|
10 |
this list of conditions and the following disclaimer. |
|
11 |
* Redistributions in binary form must reproduce the above copyright notice, |
|
12 |
this list of conditions and the following disclaimer in the documentation |
|
13 |
and/or other materials provided with the distribution. |
|
14 |
* Neither the name of ISPConfig nor the names of its contributors |
|
15 |
may be used to endorse or promote products derived from this software without |
|
16 |
specific prior written permission. |
|
17 |
|
|
18 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
|
19 |
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
20 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
21 |
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
|
22 |
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
|
23 |
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
24 |
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
|
25 |
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
|
26 |
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
|
27 |
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
28 |
*/ |
|
29 |
|
|
30 |
//** Web-only |
|
31 |
if( !empty($_SERVER['DOCUMENT_ROOT']) ) { |
|
32 |
|
|
33 |
Header("Pragma: no-cache"); |
|
34 |
Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate"); |
|
35 |
Header("Content-Type: text/html; charset=utf-8"); |
|
36 |
|
|
37 |
//** Set a few php.ini values |
|
38 |
ini_set('register_globals',0); |
|
39 |
ini_set('magic_quotes_gpc', 0); |
|
40 |
|
|
41 |
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']) || isset($_REQUEST['s']) || isset($_REQUEST['s_old']) || isset($_REQUEST['conf'])) { |
|
42 |
die('Internal Error: var override attempt detected'); |
|
43 |
exit; |
|
44 |
} |
|
45 |
} |
|
46 |
|
|
47 |
//** Set a few php.ini values |
87a11b
|
48 |
if(get_magic_quotes_runtime()) set_magic_quotes_runtime(false); |
56f1f4
|
49 |
if(isset($app)) unset($app); |
T |
50 |
if(isset($conf)) unset($conf); |
|
51 |
|
|
52 |
|
|
53 |
//** SVN Revision |
|
54 |
$svn_revision = '$Revision$'; |
|
55 |
$revision = str_replace(array('Revision:','$',' '), '', $svn_revision); |
|
56 |
|
|
57 |
//** Application |
|
58 |
define('ISPC_APP_TITLE', 'ISPConfig'); |
875504
|
59 |
define('ISPC_APP_VERSION', '3.1dev'); |
0ea2a5
|
60 |
define('DEVSYSTEM', 0); |
56f1f4
|
61 |
|
T |
62 |
|
|
63 |
//** Database |
e38d14
|
64 |
$conf['db_type'] = 'mysql'; |
J |
65 |
$conf['db_host'] = '{mysql_server_host}'; |
82e9b9
|
66 |
$conf['db_port'] = '{mysql_server_port}'; |
e38d14
|
67 |
$conf['db_database'] = '{mysql_server_database}'; |
J |
68 |
$conf['db_user'] = '{mysql_server_ispconfig_user}'; |
|
69 |
$conf['db_password'] = '{mysql_server_ispconfig_password}'; |
|
70 |
$conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1") |
c84a6d
|
71 |
$conf['db_new_link'] = false; |
T |
72 |
$conf['db_client_flags'] = 0; |
56f1f4
|
73 |
|
e38d14
|
74 |
define('DB_TYPE',$conf['db_type']); |
J |
75 |
define('DB_HOST',$conf['db_host']); |
82e9b9
|
76 |
define('DB_PORT',$conf['db_port']); |
e38d14
|
77 |
define('DB_DATABASE',$conf['db_database']); |
J |
78 |
define('DB_USER',$conf['db_user']); |
|
79 |
define('DB_PASSWORD',$conf['db_password']); |
|
80 |
define('DB_CHARSET',$conf['db_charset']); |
56f1f4
|
81 |
|
T |
82 |
|
|
83 |
//** Database settings for the master DB. This setting is only used in multiserver setups |
e38d14
|
84 |
$conf['dbmaster_type'] = 'mysql'; |
J |
85 |
$conf['dbmaster_host'] = '{mysql_master_server_host}'; |
2332f1
|
86 |
$conf['dbmaster_port'] = '{mysql_master_server_port}'; |
e38d14
|
87 |
$conf['dbmaster_database'] = '{mysql_master_server_database}'; |
J |
88 |
$conf['dbmaster_user'] = '{mysql_master_server_ispconfig_user}'; |
|
89 |
$conf['dbmaster_password'] = '{mysql_master_server_ispconfig_password}'; |
c84a6d
|
90 |
$conf['dbmaster_new_link'] = false; |
T |
91 |
$conf['dbmaster_client_flags'] = 0; |
56f1f4
|
92 |
|
T |
93 |
|
|
94 |
//** Paths |
22c1e9
|
95 |
$conf['ispconfig_log_dir'] = '/var/log/ispconfig'; |
af5f0a
|
96 |
define('ISPC_ROOT_PATH', realpath(dirname(__FILE__).'/../')); // Main ROOT is the parent directory to this file, ie interface/ or server/. NO trailing slashes. |
56f1f4
|
97 |
define('ISPC_LIB_PATH', ISPC_ROOT_PATH.'/lib'); |
T |
98 |
define('ISPC_CLASS_PATH', ISPC_ROOT_PATH.'/lib/classes'); |
|
99 |
define('ISPC_WEB_PATH', ISPC_ROOT_PATH.'/web'); |
|
100 |
define('ISPC_THEMES_PATH', ISPC_ROOT_PATH.'/web/themes'); |
|
101 |
define('ISPC_WEB_TEMP_PATH', ISPC_WEB_PATH.'/temp'); // Path for downloads, accessible via browser |
|
102 |
define('ISPC_CACHE_PATH', ISPC_ROOT_PATH.'/cache'); |
e38d14
|
103 |
define('ISPC_LOG_PATH', $conf['ispconfig_log_dir']); |
56f1f4
|
104 |
|
T |
105 |
//** Paths (Do not change!) |
e38d14
|
106 |
$conf['rootpath'] = substr(dirname(__FILE__),0,-4); |
J |
107 |
$conf['fs_div'] = '/'; // File system separator, "\\" on Windows and "/" on Linux and UNIX |
|
108 |
$conf['classpath'] = $conf['rootpath'].$conf['fs_div'].'lib'.$conf['fs_div'].'classes'; |
|
109 |
$conf['temppath'] = $conf['rootpath'].$conf['fs_div'].'temp'; |
|
110 |
$conf['logpath'] = ISPC_LOG_PATH; // Actually just a copy of $conf['ispconfig_log_dir'], might be removed in a later version |
56f1f4
|
111 |
|
e38d14
|
112 |
define('FS_DIV',$conf['fs_div']); |
J |
113 |
define('SERVER_ROOT',$conf['rootpath']); |
|
114 |
define('INCLUDE_ROOT',SERVER_ROOT.FS_DIV.'lib'); |
|
115 |
define('CLASSES_ROOT',INCLUDE_ROOT.FS_DIV.'classes'); |
56f1f4
|
116 |
|
T |
117 |
|
|
118 |
//** Server |
|
119 |
$conf['app_title'] = ISPC_APP_TITLE; |
|
120 |
$conf['app_version'] = ISPC_APP_VERSION; |
|
121 |
$conf['app_link'] = 'http://www.ispconfig.org/'; |
7320a5
|
122 |
$conf['modules_available'] = 'dashboard,admin,mail,sites,monitor,client,dns,help'; |
e38d14
|
123 |
$conf['server_id'] = '{server_id}'; |
f6049d
|
124 |
$conf['init_scripts'] = '/etc/init.d'; |
56f1f4
|
125 |
|
T |
126 |
|
|
127 |
//** Interface |
8ab3cd
|
128 |
$conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools,help'; |
56f1f4
|
129 |
|
91624b
|
130 |
//** Demo mode |
T |
131 |
/* The demo mode is an option to restrict certain actions in the interface like |
|
132 |
* changing the password of users with sys_userid < 3 etc. to be |
|
133 |
* able to run the ISPConfig interface as online demo. It does not |
|
134 |
* affect the server part. The demo mode should be always set to false |
|
135 |
* on every normal installation |
|
136 |
*/ |
|
137 |
$conf['demo_mode'] = false; |
|
138 |
|
56f1f4
|
139 |
|
T |
140 |
//** Logging |
e38d14
|
141 |
$conf['log_file'] = $conf['ispconfig_log_dir'].$conf['fs_div'].'ispconfig.log'; |
J |
142 |
$conf['log_priority'] = {ispconfig_log_priority}; // 0 = Debug, 1 = Warning, 2 = Error |
56f1f4
|
143 |
|
T |
144 |
|
|
145 |
//** Allow software package installations |
|
146 |
$conf['software_updates_enabled'] = false; |
|
147 |
|
|
148 |
|
|
149 |
//** Themes |
f598b0
|
150 |
$conf['theme'] = '{theme}'; |
e38d14
|
151 |
$conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ... |
02bf99
|
152 |
$conf['logo'] = 'themes/default/images/header_logo.png'; |
56f1f4
|
153 |
|
992797
|
154 |
|
8cf78b
|
155 |
//** Default Language and Timezone |
e38d14
|
156 |
$conf['language'] = '{language}'; |
J |
157 |
$conf['debug_language'] = false; |
992797
|
158 |
$conf['language_file_import_enabled'] = {language_file_import_enabled}; // Bool value: true / false |
b67344
|
159 |
|
T |
160 |
//* Complete timezone list: http://php.net/manual/en/timezones.php |
8cf78b
|
161 |
$conf['timezone'] = '{timezone}'; |
56f1f4
|
162 |
|
T |
163 |
|
|
164 |
//** Misc. |
e38d14
|
165 |
$conf['interface_logout_url'] = ''; // example: http://www.domain.tld/ |
56f1f4
|
166 |
|
T |
167 |
|
|
168 |
//** Auto Load Modules |
e38d14
|
169 |
$conf['start_db'] = true; |
J |
170 |
$conf['start_session'] = true; |
56f1f4
|
171 |
|
T |
172 |
//** Constants |
e38d14
|
173 |
define('LOGLEVEL_DEBUG',0); |
J |
174 |
define('LOGLEVEL_WARN',1); |
|
175 |
define('LOGLEVEL_ERROR',2); |
56f1f4
|
176 |
|
a892b8
|
177 |
//** include a local config-file if there is one |
V |
178 |
//** IMPORTANT!!! |
|
179 |
//** DO NOT MAKE A COPY OF THIS FILE AS LOCAL CONFIG-FILE |
|
180 |
//** USE A EMPTY FILE AND ONLY COPY THE SETTINGS IN IT, YOU NEED TO OVERRIDE |
609960
|
181 |
if (is_file(dirname(__FILE__) . '/config.inc.local.php')) include_once 'config.inc.local.php'; |
56f1f4
|
182 |
?> |