-
Notifications
You must be signed in to change notification settings - Fork 114
/
config.php.example
225 lines (187 loc) · 7 KB
/
config.php.example
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?php
/*
* Database credentials
*/
$dbuser = "";
$dbpass = "";
$database = "twittercapture";
$hostname = "localhost";
/*
* Capturing role(s) for DMI-TCAT
* Here you can define which types of capturing you would like to do
* Possible values are "track", "follow", "onepercent".
* Note that you can only do one of track, follow or onepercent per IP address and capturing key
*/
define('CAPTUREROLES', serialize(array('track')));
/*
* A user named 'admin' is required to use the interactive tcat_config setup for the first time (afterwards and users
* defined below can update the configuration settings).
* The user(s) who can add and modify query bins.
* All users should exist in your htaccess authentication configuration.
* Leave the array empty if you do not want to restrict access to the query manager - which, of course, is a security risk.
*/
define('ADMIN_USER', serialize(array('admin', 'admin2')));
/*
* *Super advanced and currently undocumented feature, leave settings as they are*
* We have made it possible to tunnel Twitter API connections through other hosts (obtaining a different source IP address), and use multiple keysets for multiple streaming queries.
* Each capture script should define its role, see define('CAPTUREROLES',serialize(array()))
* Every distinct role should then get a different network path below
*
*/
$GLOBALS["HOSTROLE"] = array(
'track' => "https://stream.twitter.com/",
'follow' => "https://stream.twitter.com/",
'onepercent' => "https://stream.twitter.com/",
);
/*
* Mail address to report critical errors to
*/
$mail_to = "";
/*
* Twitter API keys (basic configuration)
*/
// Please fill in your API credentials here
$twitter_consumer_key = "";
$twitter_consumer_secret = "";
$twitter_user_token = "";
$twitter_user_secret = "";
// List of additional keys to loop over when there is a limited amount of requests per key, e.g. search
// twitter_keys is an array of arrays listing different Twitter API keys
$twitter_keys = array(
array("twitter_consumer_key" => $twitter_consumer_key,
"twitter_consumer_secret" => $twitter_consumer_secret,
"twitter_user_token" => $twitter_user_token,
"twitter_user_secret" => $twitter_user_secret,
)
);
/*
* Twitter API keys (expert configuration, with multiple roles and keys)
*
* Uncomment and edit code block below to activate.
*/
/**
// Make sure you have a key for each capture role defined in CAPTUREROLES above
if (!defined('CAPTURE') || !strcmp(CAPTURE, 'track')) {
$twitter_consumer_key = "";
$twitter_consumer_secret = "";
$twitter_user_token = "";
$twitter_user_secret = "";
} elseif (!strcmp(CAPTURE, "follow")) {
$twitter_consumer_key = "";
$twitter_consumer_secret = "";
$twitter_user_token = "";
$twitter_user_secret = "";
} elseif (!strcmp(CAPTURE, "onepercent")) {
$twitter_consumer_key = "";
$twitter_consumer_secret = "";
$twitter_user_token = "";
$twitter_user_secret = "";
}
**/
/*
* Klout account info (optional)
*/
$kloutapi_key = "";
/*
* URL root in which dmi-tcats resides
*/
define('BASE_URL', 'http://example.com/dmi-tcat/');
/*
* URL root in which analysis resides
*/
define('ANALYSIS_URL', BASE_URL . 'analysis/');
/*
* Do you wish to enable fully automatic updates in the background?
*/
define('AUTOUPDATE_ENABLED', false);
/*
*
* Up to what complexity level do you wish to allow automatic upgrades (ie. in the background or at user request from inside the capture panel)?
*
* Since a lot of these updates maintain locks on the database, captures may be blocked until the upgrade has finished.
* You may want to select a higher complexity level ONLY if you have small datasets or do not mind a temporary interruption of service.
*
* Legal values are: trivial, substantial, expensive
*/
define('AUTOUPDATE_LEVEL', 'trivial');
/*
* When no database activity has occured for IDLETIME seconds during a track, the controller restarts the process. Do not set this too low,
* as there is caching before we insert. Usually the default is fine.
*/
define('IDLETIME', 600);
/*
* Report rate limit problems to the administrator every x hours ( 0 = no mail reporting )
*/
define('RATELIMIT_MAIL_HOURS', 24);
/*
* Time zone
*/
date_default_timezone_set('UTC'); // Warning: must be 'UTC'. Do not change!
/*
* Error reporting verbosity
*/
error_reporting(E_ALL & ~E_DEPRECATED);
/*
* How long the script is allowed to run
*/
ini_set("max_execution_time", 3600);
/*
* How much memory the script is allowed to take
*/
// ini_set("memory_limit", "4G");
/*
* Enable URL expander? This script will follow the links of all URLs inside tweets and resolve the final location they point towards.
* It generates a lot of requests to external hosts, but allows for more detailed URL queries.
*/
define('ENABLE_URL_EXPANDER', false);
/* Sysload monitoring. Display a traffic light indicating system load in the analysis panel */
define('TCAT_SYSLOAD_CHECKING', false);
/* If the sysload monitoring is enabled, a warning is issued when the sum processing time of all running tcat queries has reached the threshold below */
define('TCAT_SYSLOAD_WARNING', 20);
/* If the sysload monitoring is enabled, a blocking message is shown when the sum processing time of all running tcat queries has reached the threshold below */
define('TCAT_SYSLOAD_MAXIMUM', 55);
/*
* Set encoding
*/
mb_internal_encoding("UTF-8");
/*
* Set default MySQL storage engine for the creation of new tables
*
* Historically, TCAT used the MyISAM storage engine exclusively, but newer versions may support multiple engines.
* Since April 2019 the preferred engine for new TCAT deployments is TokuDB.
* (EXPERTS ONLY)
*/
define('MYSQL_ENGINE_OPTIONS', 'ENGINE=MYISAM');
/*
* set location of php
* find the location by typing 'which php' on the command line of your terminal
*/
define('PHP_CLI', '/usr/bin/php');
/*
* Use mysql INSERT DELAYED statements to insert data into the MySQL database.
* Recommended only for high-load sites, who may have nightly backupscripts locking database tables.
* Make sure to adjust the MySQL server variables delayed_queue_size, max_delayed_threads to an appropriate sizes.
* Experts only.
*/
define('USE_INSERT_DELAYED', false);
/*
* Set to true, if you want all insert statements to fail on errors. Even though such errors are caught and reported,
* setting this option on a production site is not recommended, since we are using multi-insert statements and all tweets
* in such an insert will be lost on errors.
* Developers only.
*/
define('DISABLE_INSERT_IGNORE', false);
/*
* This is the Git repository from which TCAT was installed from.
*
* If this is a GitHub HTTPS URL, it will be converted into a GitHub API URL
* to check whether the current install is up-to-date.
*
* You will want to change this only when you have forked the repository.
*/
define('REPOSITORY_URL', 'https://github.com/digitalmethodsinitiative/dmi-tcat.git');
/*
* Enable producing a (huge) JSON dump with raw Tweet contents for debugging purposes.
*/
define('ENABLE_JSON_DUMP', false);
?>