-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig.php.sample
194 lines (142 loc) · 5.93 KB
/
config.php.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
// Global configuration file.
// This is just a sample file. Copy this over to config.php and edit.
// Here is the essential configuration. You only need to modify this
// to get it working.
// This is the subversion checkout directory. include trailing slash.
define("IA_ROOT_DIR", '--write-me-IA_ROOT_DIR--');
// Database host. Probably localhost.
define("IA_DB_HOST", '--write-me-IA_DB_HOST--');
// Database name.
define("IA_DB_NAME", '--write-me-IA_DB_NAME--');
// Database user.
define("IA_DB_USER", '--write-me-IA_DB_USER--');
// Database password
define("IA_DB_PASS", '--write-me-IA_DB_PASS--');
// Keep database connection alive when lost
define("IA_DB_KEEP_ALIVE", false);
// Web host. This is probably localhost. no trailing slash here
define("IA_URL_HOST", "--write-me-IA_URL_HOST--");
define("IA_URL_HTTPS_HOST", "--write-me-IA_URL_HOST--");
// URL prefix, without the IA_URL_HOST part
// (only the part relative to the web server).
// Slashes at both ends.
define("IA_URL_PREFIX", "--write-me-IA_URL_PREFIX--");
// Define the place the avatars are being stored
define("IA_AVATAR_FOLDER", "--write-me-IA_AVATAR_FOLDER--");
// Congratulations! You're done with the essential configuration.
// --------------------------------------------------------------
// There are some more settings to adjust but they are optional.
// Enable this when working on your own local copy. It gives you a few
// debugging & profiling tools. Additionally, it disables Google Analytics
// or other external resources.
define("IA_DEVELOPMENT_MODE", true);
// Determine if script is runing in an HTTP environment. Otherwise it is
// probably running in CLI mode. Don't change it.
// FIXME: move to common/common.php
define("IA_HTTP_ENV", isset($_SERVER['REQUEST_URI']));
// SMF database prefix (required!)
define("IA_SMF_DB_PREFIX", 'ia_smf_');
// "The" url to infoarena home page.
define("IA_URL", IA_URL_HOST . IA_URL_PREFIX);
// URL to SMF. No trailing slash
// Example: http://localhost/infoarena_smf
define("IA_SMF_URL", IA_URL . 'forum');
// Enable support for https connections. If enabled, secure connections are
// enforced for login and register pages.
define("IA_HTTPS_ENABLED", !IA_DEVELOPMENT_MODE);
// cookie domain
// leave null when working on localhost
define("IA_COOKIE_DOMAIN", null);
// infoarena session lifetime
// defaults to 5days
define("IA_SESSION_LIFETIME_SECONDS", 5 * 24 * 3600);
// Fatal error mask.
// These are the errors the scripts halts on.
// E_ALL & ~ (E_USER_NOTICE | E_USER_WARNING)
// FIXME: Why isn't this configurable in php.ini?
define("IA_PHP_FATAL_ERROR_MASK", 0x19FF);
// If this is true then the site is in debug.
// NOTE: set this to false when public.
define("IA_DEBUG_MODE", true);
// This aren't really settings.
// FIXME: Couldn't find a better place to put this in.
// - NOTE: it can't reside in common/db/*.php files since SMF
// cannot link db api.
// - NOTE: it can't reside in www/* since judge needs it too
define("IA_TASK_TEXTBLOCK_PREFIX", 'problema/');
define("IA_USER_TEXTBLOCK_PREFIX", 'utilizator/');
define("IA_NEWSLETTER_TEXTBLOCK_PREFIX", 'newsletter/');
// FIXME: Do we really need this?
define("IA_ROUND_TEXTBLOCK_PREFIX", 'runda/');
// Secret code
// Random string used as salt in various places where hashing is needed.
// For security reasons, this should be changed when uploading to a production
// website.
define("IA_SECRET", "developersetup");
// Mail setup
// Enable this only if you have a SMTP server around
define("IA_SMTP_ENABLED", false);
if (IA_SMTP_ENABLED) {
// only if SMTP is enabled, you can configure these
define("IA_SMTP_HOST", "localhost");
define("IA_SMTP_PORT", "25");
}
// Disable mysql_unbuffered_query
define("IA_DB_MYSQL_UNBUFFERED_QUERY", false);
// Enable the DB cache by default.
// If it's broken then you have a bug.
// Disabling it might still be usefull for mysql tweaking.
define("IA_ENABLE_DB_CACHE", true);
// Enabled the create_function_cached cached.
// If false then create_function_cached_cached is the same as create_function_cached
define("IA_ENABLE_CREATE_FUNCTION_CACHE", true);
// Disable memory cache by default because it requires additional stuff
define("IA_MEM_CACHE_METHOD", "none");
// Default TTL for cache items.
define("IA_MEM_CACHE_EXPIRATION", 3600);
// TTL for tag caches.
define("IA_MEM_CACHE_TAGS_EXPIRATION", 3600);
// Maximum tags to use in cache
define("IA_MAX_TAGS_TO_CACHE", 2);
if (IA_MEM_CACHE_METHOD === "memcached") {
define('IA_MEMCACHED_HOST', '127.0.0.1');
define('IA_MEMCACHED_PORT', 11211);
// Round TTL.
define("IA_MEM_CACHE_ROUND_EXPIRATION", 3600);
// Task TTL.
define("IA_MEM_CACHE_TASK_EXPIRATION", 3600);
} else {
// Smaller TTLs because evaluator doesn't have access to cache to
// invalidate old data on updates.
// Round TTL.
define("IA_MEM_CACHE_ROUND_EXPIRATION", 10);
// Task TTL.
define("IA_MEM_CACHE_TASK_EXPIRATION", 10);
}
// Logging options. Anything else in normal operation is a bug.
// Filling error_log on a production machine sucks.
// If true then log all security checks.
// Warning: tons of output.
define("IA_LOG_SECURITY", false);
// If true then log disk cache hits/misses
define("IA_LOG_DISK_CACHE", false);
// If true then log mem cache hits/misses
define("IA_LOG_MEM_CACHE", false);
// Log each and every SQL query. Not for the faint of heart.
define("IA_LOG_SQL_QUERY", false);
// Try to EXPLAIN every select query, useful when optimizing.
define("IA_LOG_SQL_QUERY_EXPLAIN", false);
// CAPTHCA Keys
define("IA_CAPTCHA_PUBLIC_KEY", "6LesuwQAAAAAAPHgdh9Hem1KJfvd5Ng1yRoIweio");
define("IA_CAPTCHA_PRIVATE_KEY", "6LesuwQAAAAAAF3FUPWFGQD1xPITFagjqWUO9Urs");
// Facebook App-Id
define("IA_FACEBOOK_APP_ID", '159779000715246');
// Twitter Account
define("IA_TWITTER_ACCOUNT", 'infoarena.ro');
// AWS Credentials
define("IA_AWS_FOR_GRADER_FILES", false);
define("AWS_RO_ACCESS_KEY", "");
define("AWS_RO_SECRET_KEY", "");
define("AWS_RW_ACCESS_KEY", "");
define("AWS_RW_SECRET_KEY", "");