Till Brehm
2014-10-28 8348c8143be4775eccb5c24edebf7f7215a6f90a
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');
8348c8 59 define('ISPC_APP_VERSION', '3.0.5.4p5');
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}';
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")
c84a6d 70 $conf['db_new_link'] = false;
T 71 $conf['db_client_flags'] = 0;
56f1f4 72
e38d14 73 define('DB_TYPE',$conf['db_type']);
J 74 define('DB_HOST',$conf['db_host']);
75 define('DB_DATABASE',$conf['db_database']);
76 define('DB_USER',$conf['db_user']);
77 define('DB_PASSWORD',$conf['db_password']);
78 define('DB_CHARSET',$conf['db_charset']);
56f1f4 79
T 80
81 //** Database settings for the master DB. This setting is only used in multiserver setups
e38d14 82 $conf['dbmaster_type']            = 'mysql';
J 83 $conf['dbmaster_host']            = '{mysql_master_server_host}';
84 $conf['dbmaster_database']        = '{mysql_master_server_database}';
85 $conf['dbmaster_user']            = '{mysql_master_server_ispconfig_user}';
86 $conf['dbmaster_password']        = '{mysql_master_server_ispconfig_password}';
c84a6d 87 $conf['dbmaster_new_link']         = false;
T 88 $conf['dbmaster_client_flags']     = 0;
56f1f4 89
T 90
91 //** Paths
22c1e9 92 $conf['ispconfig_log_dir'] = '/var/log/ispconfig';
af5f0a 93 define('ISPC_ROOT_PATH', realpath(dirname(__FILE__).'/../')); // Main ROOT is the parent directory to this file, ie interface/ or server/. NO trailing slashes.
56f1f4 94 define('ISPC_LIB_PATH', ISPC_ROOT_PATH.'/lib');
T 95 define('ISPC_CLASS_PATH', ISPC_ROOT_PATH.'/lib/classes');
96 define('ISPC_WEB_PATH', ISPC_ROOT_PATH.'/web');
97 define('ISPC_THEMES_PATH', ISPC_ROOT_PATH.'/web/themes');
98 define('ISPC_WEB_TEMP_PATH', ISPC_WEB_PATH.'/temp'); // Path for downloads, accessible via browser
99 define('ISPC_CACHE_PATH', ISPC_ROOT_PATH.'/cache');
e38d14 100 define('ISPC_LOG_PATH', $conf['ispconfig_log_dir']);
56f1f4 101
T 102 //** Paths (Do not change!)
e38d14 103 $conf['rootpath'] = substr(dirname(__FILE__),0,-4);
J 104 $conf['fs_div'] = '/'; // File system separator, "\\" on Windows and "/" on Linux and UNIX
105 $conf['classpath'] = $conf['rootpath'].$conf['fs_div'].'lib'.$conf['fs_div'].'classes';
106 $conf['temppath'] = $conf['rootpath'].$conf['fs_div'].'temp';
107 $conf['logpath'] = ISPC_LOG_PATH; // Actually just a copy of $conf['ispconfig_log_dir'], might be removed in a later version
56f1f4 108
e38d14 109 define('FS_DIV',$conf['fs_div']);
J 110 define('SERVER_ROOT',$conf['rootpath']);
111 define('INCLUDE_ROOT',SERVER_ROOT.FS_DIV.'lib');
112 define('CLASSES_ROOT',INCLUDE_ROOT.FS_DIV.'classes');
56f1f4 113
T 114
115 //** Server
116 $conf['app_title'] = ISPC_APP_TITLE;
117 $conf['app_version'] = ISPC_APP_VERSION;
118 $conf['app_link'] = 'http://www.ispconfig.org/';
7320a5 119 $conf['modules_available'] = 'dashboard,admin,mail,sites,monitor,client,dns,help';
e38d14 120 $conf['server_id'] = '{server_id}';
f6049d 121 $conf['init_scripts'] = '/etc/init.d';
56f1f4 122
T 123
124 //** Interface
8ab3cd 125 $conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools,help';
56f1f4 126
91624b 127 //** Demo mode
T 128 /* The demo mode is an option to restrict certain actions in the interface like 
129 *  changing the password of users with sys_userid < 3 etc. to be 
130 *  able to run the ISPConfig interface as online demo. It does not
131 *  affect the server part. The demo mode should be always set to false
132 *  on every normal installation
133 */
134 $conf['demo_mode'] = false;
135
56f1f4 136
T 137 //** Logging
e38d14 138 $conf['log_file'] = $conf['ispconfig_log_dir'].$conf['fs_div'].'ispconfig.log';
J 139 $conf['log_priority'] = {ispconfig_log_priority}; // 0 = Debug, 1 = Warning, 2 = Error
56f1f4 140
T 141
142 //** Allow software package installations
143 $conf['software_updates_enabled'] = false;
144
145
146 //** Themes
f598b0 147 $conf['theme'] = '{theme}';
e38d14 148 $conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
02bf99 149 $conf['logo'] = 'themes/default/images/header_logo.png';
56f1f4 150
992797 151
8cf78b 152 //** Default Language and Timezone
e38d14 153 $conf['language'] = '{language}';
J 154 $conf['debug_language'] = false;
992797 155 $conf['language_file_import_enabled'] = {language_file_import_enabled}; // Bool value: true / false
b67344 156
T 157 //* Complete timezone list: http://php.net/manual/en/timezones.php
8cf78b 158 $conf['timezone'] = '{timezone}';
56f1f4 159
T 160
161 //** Misc.
e38d14 162 $conf['interface_logout_url'] = ''; // example: http://www.domain.tld/
56f1f4 163
T 164
165 //** Auto Load Modules
e38d14 166 $conf['start_db'] = true;
J 167 $conf['start_session'] = true;
56f1f4 168
T 169 //** Constants
e38d14 170 define('LOGLEVEL_DEBUG',0);
J 171 define('LOGLEVEL_WARN',1);
172 define('LOGLEVEL_ERROR',2);
56f1f4 173
a892b8 174 //** include a local config-file if there is one
V 175 //** IMPORTANT!!!
176 //** DO NOT MAKE A COPY OF THIS FILE AS LOCAL CONFIG-FILE
177 //** USE A EMPTY FILE AND ONLY COPY THE SETTINGS IN IT, YOU NEED TO OVERRIDE
609960 178 if (is_file(dirname(__FILE__) . '/config.inc.local.php')) include_once 'config.inc.local.php';
56f1f4 179 ?>