Commit | Line | Data |
---|---|---|
eb049397 DL |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
3435af9a | 4 | | CiviCRM version 4.7 | |
eb049397 | 5 | +--------------------------------------------------------------------+ |
2a73d3b0 | 6 | | Copyright CiviCRM LLC (c) 2004-2017 | |
eb049397 DL |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
10 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
11 | | under the terms of the GNU Affero General Public License | | |
12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
13 | | | | |
14 | | CiviCRM is distributed in the hope that it will be useful, but | | |
15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
17 | | See the GNU Affero General Public License for more details. | | |
18 | | | | |
19 | | You should have received a copy of the GNU Affero General Public | | |
20 | | License and the CiviCRM Licensing Exception along | | |
21 | | with this program; if not, contact CiviCRM LLC | | |
22 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
23 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
25 | +--------------------------------------------------------------------+ | |
26 | */ | |
27 | ||
28 | /** | |
29 | * CiviCRM Configuration File. | |
30 | */ | |
2f8edd66 | 31 | global $civicrm_setting; |
eb049397 DL |
32 | |
33 | /** | |
34 | * Content Management System (CMS) Host: | |
35 | * | |
36 | * CiviCRM can be hosted in either Drupal 6 or 7, Joomla or WordPress. | |
37 | * | |
83cac775 | 38 | * Settings for Backdrop CMS: |
92b1c24f | 39 | * define( 'CIVICRM_UF' , 'Backdrop'); |
83cac775 | 40 | * |
eb049397 | 41 | * Settings for Drupal 7.x: |
92b1c24f | 42 | * define( 'CIVICRM_UF' , 'Drupal'); |
eb049397 DL |
43 | * |
44 | * Settings for Drupal 6.x: | |
23b5a711 | 45 | * define( 'CIVICRM_UF' , 'Drupal6'); |
eb049397 DL |
46 | * |
47 | * Settings for Joomla 1.7.x - 2.5.x: | |
23b5a711 | 48 | * define( 'CIVICRM_UF' , 'Joomla'); |
eb049397 DL |
49 | * |
50 | * Settings for WordPress 3.3.x: | |
23b5a711 | 51 | * define( 'CIVICRM_UF' , 'WordPress'); |
eb049397 DL |
52 | * |
53 | * You may have issues with images in CiviCRM. If this is the case, be sure | |
54 | * to update the CiviCRM Resource URL field to your CiviCRM root directory | |
55 | * (Administer::System Settings::Resource URLs). | |
56 | */ | |
8d133ef2 | 57 | if (!defined('CIVICRM_UF')) { |
0a4cd490 TO |
58 | if (getenv('CIVICRM_UF')) { |
59 | define('CIVICRM_UF', getenv('CIVICRM_UF')); | |
60 | } | |
61 | else { | |
62 | define('CIVICRM_UF', '%%cms%%'); | |
63 | } | |
8d133ef2 | 64 | } |
eb049397 DL |
65 | |
66 | /** | |
67 | * Content Management System (CMS) Datasource: | |
68 | * | |
9beff2cf NM |
69 | * Update this setting with your CMS (Drupal, Backdrop CMS, or Joomla) database username, password, server and DB name. |
70 | * If any of these contain a single quote or backslash, escape those characters with a backslash: \' and \\, respectively. | |
71 | * | |
eb049397 | 72 | * Datasource (DSN) format: |
a8219e90 | 73 | * define( 'CIVICRM_UF_DSN', 'mysql://cms_db_username:cms_db_password@db_server/cms_database?new_link=true'); |
eb049397 | 74 | */ |
844b94bd | 75 | if (!defined('CIVICRM_UF_DSN') && CIVICRM_UF !== 'UnitTests') { |
a8219e90 | 76 | define( 'CIVICRM_UF_DSN' , 'mysql://%%CMSdbUser%%:%%CMSdbPass%%@%%CMSdbHost%%/%%CMSdbName%%?new_link=true'); |
8d133ef2 | 77 | } |
eb049397 DL |
78 | |
79 | /** | |
80 | * CiviCRM Database Settings | |
81 | * | |
82 | * Database URL (CIVICRM_DSN) for CiviCRM Data: | |
83 | * Database URL format: | |
a8219e90 | 84 | * define( 'CIVICRM_DSN', 'mysql://crm_db_username:crm_db_password@db_server/crm_database?new_link=true'); |
eb049397 DL |
85 | * |
86 | * Drupal and CiviCRM can share the same database, or can be installed into separate databases. | |
92b1c24f | 87 | * Backdrop CMS and CiviCRM can also share the same database, or can be installed into separate databases. |
eb049397 | 88 | * |
92b1c24f JL |
89 | * EXAMPLE: Drupal/Backdrop and CiviCRM running in the same database... |
90 | * DB Name = cms, DB User = cms | |
a8219e90 | 91 | * define( 'CIVICRM_DSN' , 'mysql://cms:YOUR_PASSWORD@localhost/cms?new_link=true'); |
eb049397 | 92 | * |
92b1c24f JL |
93 | * EXAMPLE: Drupal/Backdrop and CiviCRM running in separate databases... |
94 | * CMS DB Name = cms, DB User = cms | |
eb049397 | 95 | * CiviCRM DB Name = civicrm, CiviCRM DB User = civicrm |
a8219e90 | 96 | * define( 'CIVICRM_DSN' , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true'); |
eb049397 | 97 | * |
9beff2cf NM |
98 | * If your username, password, server or DB name contain a single quote or backslash, escape those characters |
99 | * with a backslash: \' and \\, respectively. | |
100 | * | |
eb049397 | 101 | */ |
8d133ef2 | 102 | if (!defined('CIVICRM_DSN')) { |
2b045ddd TO |
103 | if (CIVICRM_UF === 'UnitTests' && isset($GLOBALS['_CV']['TEST_DB_DSN'])) { |
104 | define('CIVICRM_DSN', $GLOBALS['_CV']['TEST_DB_DSN']); | |
844b94bd TO |
105 | } |
106 | else { | |
a8219e90 | 107 | define('CIVICRM_DSN', 'mysql://%%dbUser%%:%%dbPass%%@%%dbHost%%/%%dbName%%?new_link=true'); |
844b94bd | 108 | } |
8d133ef2 | 109 | } |
eb049397 | 110 | |
a8219e90 SL |
111 | /** |
112 | * CiviCRM DSN Mode | |
113 | * Used to determine if you want CiviCRM to automatically change the dsn to mysqli if its avaliable. | |
114 | * Uncomment and edit below as necessary | |
115 | */ | |
116 | // define ('DB_DSN_MODE', 'auto'); | |
117 | ||
118 | ||
eb049397 DL |
119 | /** |
120 | * CiviCRM Logging Database | |
121 | * | |
122 | * Used to point to a different database to use for logging (if desired). If unset defaults to equal CIVICRM_DSN. | |
123 | * The CIVICRM_DSN user needs to have the rights to modify the below database schema and be able to write to it. | |
124 | */ | |
8d133ef2 TO |
125 | if (!defined('CIVICRM_LOGGING_DSN')) { |
126 | define('CIVICRM_LOGGING_DSN', CIVICRM_DSN); | |
127 | } | |
eb049397 DL |
128 | |
129 | /** | |
130 | * File System Paths: | |
131 | * | |
132 | * $civicrm_root is the file system path on your server where the civicrm | |
133 | * code is installed. Use an ABSOLUTE path (not a RELATIVE path) for this setting. | |
134 | * | |
135 | * CIVICRM_TEMPLATE_COMPILEDIR is the file system path where compiled templates are stored. | |
136 | * These sub-directories and files are temporary caches and will be recreated automatically | |
137 | * if deleted. | |
138 | * | |
139 | * IMPORTANT: The COMPILEDIR directory must exist, | |
140 | * and your web server must have read/write access to these directories. | |
141 | * | |
142 | * | |
143 | * EXAMPLE - Drupal: | |
144 | * If the path to the Drupal home directory is /var/www/htdocs/drupal | |
145 | * the $civicrm_root setting would be: | |
146 | * $civicrm_root = '/var/www/htdocs/drupal/sites/all/modules/civicrm/'; | |
147 | * | |
148 | * the CIVICRM_TEMPLATE_COMPILEDIR would be: | |
23b5a711 | 149 | * define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/drupal/sites/default/files/civicrm/templates_c/'); |
eb049397 | 150 | * |
92b1c24f JL |
151 | * EXAMPLE - Backdrop CMS: |
152 | * If the path to the Backdrop home directory is /var/www/htdocs/backdrop | |
153 | * the $civicrm_root setting would be: | |
154 | * $civicrm_root = '/var/www/htdocs/backdrop/modules/civicrm/'; | |
155 | * | |
156 | * the CIVICRM_TEMPLATE_COMPILEDIR would be: | |
157 | * define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/backdrop/files/civicrm/templates_c/'); | |
158 | * | |
eb049397 DL |
159 | * EXAMPLE - Joomla Installations: |
160 | * If the path to the Joomla home directory is /var/www/htdocs/joomla | |
161 | * the $civicrm_root setting would be: | |
162 | * $civicrm_root = '/var/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/'; | |
163 | * | |
164 | * the CIVICRM_TEMPLATE_COMPILEDIR would be: | |
23b5a711 | 165 | * define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/joomla/media/civicrm/templates_c/'); |
eb049397 DL |
166 | * |
167 | * EXAMPLE - WordPress Installations: | |
750752f2 | 168 | * If the path to the WordPress home directory is /var/www/htdocs/wordpress and the path to the plugin directory is /var/www/htdocs/wordpress/wp-content/plugins |
eb049397 DL |
169 | * the $civicrm_root setting would be: |
170 | * $civicrm_root = '/var/www/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/'; | |
171 | * | |
172 | * the CIVICRM_TEMPLATE_COMPILEDIR would be: | |
750752f2 | 173 | * define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/wordpress/wp-content/uploads/civicrm/templates_c/'); |
eb049397 DL |
174 | * |
175 | */ | |
176 | ||
177 | global $civicrm_root; | |
178 | ||
179 | $civicrm_root = '%%crmRoot%%'; | |
8d133ef2 | 180 | if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) { |
23b5a711 | 181 | define( 'CIVICRM_TEMPLATE_COMPILEDIR', '%%templateCompileDir%%'); |
8d133ef2 | 182 | } |
eb049397 DL |
183 | |
184 | /** | |
185 | * Site URLs: | |
186 | * | |
92b1c24f | 187 | * This section defines absolute and relative URLs to access the host CMS (Backdrop, Drupal, or Joomla) resources. |
eb049397 DL |
188 | * |
189 | * IMPORTANT: Trailing slashes should be used on all URL settings. | |
190 | * | |
191 | * | |
192 | * EXAMPLE - Drupal Installations: | |
193 | * If your site's home url is http://www.example.com/drupal/ | |
194 | * these variables would be set as below. Modify as needed for your install. | |
195 | * | |
196 | * CIVICRM_UF_BASEURL - home URL for your site: | |
23b5a711 | 197 | * define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/drupal/'); |
eb049397 | 198 | * |
92b1c24f JL |
199 | * EXAMPLE - Backdrop CMS Installations: |
200 | * If your site's home url is http://www.example.com/backdrop/ | |
201 | * these variables would be set as below. Modify as needed for your install. | |
202 | * | |
203 | * CIVICRM_UF_BASEURL - home URL for your site: | |
204 | * define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/backdrop/'); | |
205 | * | |
eb049397 DL |
206 | * EXAMPLE - Joomla Installations: |
207 | * If your site's home url is http://www.example.com/joomla/ | |
208 | * | |
209 | * CIVICRM_UF_BASEURL - home URL for your site: | |
210 | * Administration site: | |
23b5a711 | 211 | * define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/joomla/administrator/'); |
eb049397 | 212 | * Front-end site: |
23b5a711 | 213 | * define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/joomla/'); |
eb049397 DL |
214 | * |
215 | */ | |
8d133ef2 | 216 | if (!defined('CIVICRM_UF_BASEURL')) { |
23b5a711 | 217 | define( 'CIVICRM_UF_BASEURL' , '%%baseURL%%'); |
8d133ef2 | 218 | } |
eb049397 | 219 | |
32799d94 EM |
220 | /** |
221 | * Define any CiviCRM Settings Overrides per http://wiki.civicrm.org/confluence/display/CRMDOC/Override+CiviCRM+Settings | |
222 | * | |
223 | * Uncomment and edit the below as appropriate. | |
224 | */ | |
32799d94 EM |
225 | |
226 | // Override the Temporary Files directory. | |
f42b34c1 | 227 | // $civicrm_setting['Directory Preferences']['uploadDir'] = '/path/to/upload-dir' ; |
32799d94 EM |
228 | |
229 | // Override the custom files upload directory. | |
f42b34c1 | 230 | // $civicrm_setting['Directory Preferences']['customFileUploadDir'] = '/path/to/custom-dir'; |
32799d94 EM |
231 | |
232 | // Override the images directory. | |
233 | // $civicrm_setting['Directory Preferences']['imageUploadDir'] = '/path/to/image-upload-dir' ; | |
234 | ||
235 | // Override the custom templates directory. | |
236 | // $civicrm_setting['Directory Preferences']['customTemplateDir'] = '/path/to/template-dir'; | |
237 | ||
238 | // Override the Custom php path directory. | |
239 | // $civicrm_setting['Directory Preferences']['customPHPPathDir'] = '/path/to/custom-php-dir'; | |
240 | ||
241 | // Override the extensions directory. | |
242 | // $civicrm_setting['Directory Preferences']['extensionsDir'] = '/path/to/extensions-dir'; | |
243 | ||
244 | // Override the resource url | |
245 | // $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://example.com/example-resource-url/'; | |
246 | ||
247 | // Override the Image Upload URL (System Settings > Resource URLs) | |
248 | // $civicrm_setting['URL Preferences']['imageUploadURL'] = 'http://example.com/example-image-upload-url'; | |
249 | ||
250 | // Override the Custom CiviCRM CSS URL | |
251 | // $civicrm_setting['URL Preferences']['customCSSURL'] = 'http://example.com/example-css-url' ; | |
252 | ||
253 | // Override the extensions resource URL | |
254 | // $civicrm_setting['URL Preferences']['extensionsURL'] = 'http://example.com/pathtoextensiondir' | |
255 | ||
256 | // Disable display of Community Messages on home dashboard | |
257 | // $civicrm_setting['CiviCRM Preferences']['communityMessagesUrl'] = false; | |
258 | ||
259 | // Disable automatic download / installation of extensions | |
260 | // $civicrm_setting['Extension Preferences']['ext_repo_url'] = false; | |
261 | ||
f76ec559 TO |
262 | // set triggers to be managed offline per CRM-18212 |
263 | // $civicrm_setting['CiviCRM Preferences']['logging_no_trigger_permission'] = 1; | |
264 | ||
f7732cb7 KC |
265 | // Override the CMS root path defined by cmsRootPath. |
266 | // define('CIVICRM_CMSDIR', '/path/to/install/root/'); | |
267 | ||
89732521 CW |
268 | // Opt-out of announcements by the CiviCRM core team for releases, paid services, events, etc. Separate each preferred optout category with a comma: |
269 | // "offers": paid service offers | |
270 | // "asks": requests for donations or membership signup/renewal to CiviCRM | |
271 | // "releases": major release announcements | |
272 | // "events": announcements of local/national upcoming events | |
273 | // $civicrm_setting['CiviCRM Preferences']['communityMessagesUrl'] = 'https://alert.civicrm.org/alert?prot=1&ver={ver}&uf={uf}&sid={sid}&lang={lang}&co={co}&optout=offers,asks'; | |
274 | ||
f7732cb7 | 275 | |
32799d94 | 276 | /** |
eb049397 DL |
277 | * If you are using any CiviCRM script in the bin directory that |
278 | * requires authentication, then you also need to set this key. | |
279 | * We recommend using a 16-32 bit alphanumeric/punctuation key. | |
280 | * More info at http://wiki.civicrm.org/confluence/display/CRMDOC/Command-line+Script+Configuration | |
281 | */ | |
8d133ef2 | 282 | if (!defined('CIVICRM_SITE_KEY')) { |
23b5a711 | 283 | define( 'CIVICRM_SITE_KEY', '%%siteKey%%'); |
8d133ef2 | 284 | } |
eb049397 DL |
285 | |
286 | /** | |
287 | * Enable this constant, if you want to send your email through the smarty | |
288 | * templating engine(allows you to do conditional and more complex logic) | |
289 | * | |
290 | */ | |
8d133ef2 TO |
291 | if (!defined('CIVICRM_MAIL_SMARTY')) { |
292 | define( 'CIVICRM_MAIL_SMARTY', 0 ); | |
293 | } | |
eb049397 DL |
294 | |
295 | /** | |
296 | * This setting logs all emails to a file. Useful for debugging any mail (or civimail) issues. | |
297 | * Enabling this setting will not send any email, ensure this is commented out in production | |
298 | * The CIVICRM_MAIL_LOG is a debug option which disables MTA (mail transport agent) interaction. | |
299 | * You must disable CIVICRM_MAIL_LOG before CiviCRM will talk to your MTA. | |
300 | */ | |
8d133ef2 | 301 | // if (!defined('CIVICRM_MAIL_LOG')) { |
23b5a711 | 302 | // define( 'CIVICRM_MAIL_LOG', '%%templateCompileDir%%/mail.log'); |
8d133ef2 | 303 | // } |
eb049397 | 304 | |
8d133ef2 TO |
305 | |
306 | if (!defined('CIVICRM_DOMAIN_ID')) { | |
23b5a711 | 307 | define( 'CIVICRM_DOMAIN_ID', 1); |
8d133ef2 | 308 | } |
eb049397 | 309 | |
594efcac TO |
310 | /** |
311 | * Setting to define the environment in which this CiviCRM instance is running. | |
312 | * Note the setting here must be value from the option group 'Environment', | |
313 | * (see Administration > System Settings > Option Groups, Options beside Environment) | |
314 | * which by default has three option values: 'Production', 'Staging', 'Development'. | |
8a078f99 | 315 | * NB: defining a value for environment here prevents it from being set |
594efcac TO |
316 | * via the browser. |
317 | */ | |
318 | // $civicrm_setting['domain']['environment'] = 'Production'; | |
f008885c | 319 | |
eb049397 | 320 | /** |
59e56021 | 321 | * Settings to enable external caching using a cache server. This is an |
eb049397 DL |
322 | * advanced feature, and you should read and understand the documentation |
323 | * before you turn it on. We cannot store these settings in the DB since the | |
324 | * config could potentially also be cached and we need to avoid an infinite | |
325 | * recursion scenario. | |
326 | * | |
327 | * @see http://civicrm.org/node/126 | |
328 | */ | |
329 | ||
330 | /** | |
59e56021 H |
331 | * If you have a cache server configured and want CiviCRM to make use of it, |
332 | * set the following constant. You should only set this once you have your cache | |
eb049397 DL |
333 | * server up and working, because CiviCRM will not start up if your server is |
334 | * unavailable on the host and port that you specify. By default CiviCRM will use | |
335 | * an in-memory array cache | |
336 | * | |
337 | * To use the php extension memcache use a value of 'Memcache' | |
338 | * To use the php extension memcached use a value of 'Memcached' | |
339 | * To use the php extension apc use a value of 'APCcache' | |
59e56021 | 340 | * To use the php extension redis use a value of 'Redis' |
eb049397 DL |
341 | * To not use any caching (not recommended), use a value of 'NoCache' |
342 | * | |
343 | */ | |
8d133ef2 | 344 | if (!defined('CIVICRM_DB_CACHE_CLASS')) { |
23b5a711 | 345 | define('CIVICRM_DB_CACHE_CLASS', 'ArrayCache'); |
8d133ef2 | 346 | } |
eb049397 DL |
347 | |
348 | /** | |
349 | * Change this to the IP address of your cache server if it is not on the | |
350 | * same machine (Unix). | |
351 | */ | |
8d133ef2 | 352 | if (!defined('CIVICRM_DB_CACHE_HOST')) { |
23b5a711 | 353 | define('CIVICRM_DB_CACHE_HOST', 'localhost'); |
8d133ef2 | 354 | } |
eb049397 DL |
355 | |
356 | /** | |
9d2f1acb | 357 | * Change this if you are not using the standard port for your cache server. |
358 | * | |
359 | * The standard port for Memcache & APCCache is 11211. For Redis it is 6379. | |
eb049397 | 360 | */ |
8d133ef2 | 361 | if (!defined('CIVICRM_DB_CACHE_PORT')) { |
23b5a711 | 362 | define('CIVICRM_DB_CACHE_PORT', 11211 ); |
8d133ef2 | 363 | } |
eb049397 | 364 | |
59e56021 | 365 | /** |
9d2f1acb | 366 | * Change this if your cache server requires a password (currently only works |
59e56021 H |
367 | * with Redis) |
368 | */ | |
369 | if (!defined('CIVICRM_DB_CACHE_PASSWORD')) { | |
370 | define('CIVICRM_DB_CACHE_PASSWORD', '' ); | |
371 | } | |
372 | ||
eb049397 DL |
373 | /** |
374 | * Items in cache will expire after the number of seconds specified here. | |
375 | * Default value is 3600 (i.e., after an hour) | |
376 | */ | |
8d133ef2 | 377 | if (!defined('CIVICRM_DB_CACHE_TIMEOUT')) { |
23b5a711 | 378 | define('CIVICRM_DB_CACHE_TIMEOUT', 3600 ); |
8d133ef2 | 379 | } |
eb049397 DL |
380 | |
381 | /** | |
59e56021 | 382 | * If you are sharing the same cache instance with more than one CiviCRM |
eb049397 DL |
383 | * database, you will need to set a different value for the following argument |
384 | * so that each copy of CiviCRM will not interfere with other copies. If you only | |
385 | * have one copy of CiviCRM, you may leave this set to ''. A good value for | |
386 | * this if you have two servers might be 'server1_' for the first server, and | |
387 | * 'server2_' for the second server. | |
388 | */ | |
59e56021 H |
389 | if (!defined('CIVICRM_DB_CACHE_PREFIX')) { |
390 | define('CIVICRM_DB_CACHE_PREFIX', ''); | |
8d133ef2 | 391 | } |
eb049397 DL |
392 | |
393 | /** | |
394 | * If you have multilingual site and you are using the "inherit CMS language" | |
395 | * configuration option, but wish to, for example, use fr_CA instead of the | |
396 | * default fr_FR (for French), set one or more of the constants below to an | |
397 | * appropriate regional value. | |
398 | */ | |
399 | // define('CIVICRM_LANGUAGE_MAPPING_FR', 'fr_CA'); | |
400 | // define('CIVICRM_LANGUAGE_MAPPING_EN', 'en_CA'); | |
401 | // define('CIVICRM_LANGUAGE_MAPPING_ES', 'es_MX'); | |
402 | // define('CIVICRM_LANGUAGE_MAPPING_PT', 'pt_BR'); | |
403 | // define('CIVICRM_LANGUAGE_MAPPING_ZH', 'zh_TW'); | |
404 | ||
de67bc86 ML |
405 | /** |
406 | * Native gettext improves performance of localized CiviCRM installations | |
407 | * significantly. However, your host must enable the locale (language). | |
408 | * On most GNU/Linux, Unix or MacOSX systems, you may view them with | |
409 | * the command line by typing: "locale -a". | |
410 | * | |
411 | * On Debian or Ubuntu, you may reconfigure locales with: | |
412 | * # dpkg-reconfigure locales | |
413 | * | |
414 | * For more information: | |
415 | * http://wiki.civicrm.org/confluence/x/YABFBQ | |
416 | */ | |
8d133ef2 | 417 | // if (!defined('CIVICRM_GETTEXT_NATIVE')) { |
de67bc86 | 418 | // define('CIVICRM_GETTEXT_NATIVE', 1); |
8d133ef2 | 419 | // } |
de67bc86 | 420 | |
eb049397 DL |
421 | /** |
422 | * Configure MySQL to throw more errors when encountering unusual SQL expressions. | |
423 | * | |
424 | * If undefined, the value is determined automatically. For CiviCRM tarballs, it defaults | |
425 | * to FALSE; for SVN checkouts, it defaults to TRUE. | |
426 | */ | |
8d133ef2 | 427 | // if (!defined('CIVICRM_MYSQL_STRICT')) { |
23b5a711 | 428 | // define('CIVICRM_MYSQL_STRICT', TRUE ); |
8d133ef2 | 429 | // } |
eb049397 | 430 | |
3b2c20b7 TO |
431 | if (CIVICRM_UF === 'UnitTests') { |
432 | if (!defined('CIVICRM_CONTAINER_CACHE')) define('CIVICRM_CONTAINER_CACHE', 'auto'); | |
433 | if (!defined('CIVICRM_MYSQL_STRICT')) define('CIVICRM_MYSQL_STRICT', true); | |
434 | } | |
435 | ||
eb049397 DL |
436 | /** |
437 | * | |
438 | * Do not change anything below this line. Keep as is | |
439 | * | |
440 | */ | |
441 | ||
442 | $include_path = '.' . PATH_SEPARATOR . | |
443 | $civicrm_root . PATH_SEPARATOR . | |
444 | $civicrm_root . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR . | |
445 | get_include_path( ); | |
446 | if ( set_include_path( $include_path ) === false ) { | |
447 | echo "Could not set the include path<p>"; | |
448 | exit( ); | |
449 | } | |
450 | ||
8d133ef2 | 451 | if (!defined('CIVICRM_CLEANURL')) { |
23b5a711 EM |
452 | if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') { |
453 | define('CIVICRM_CLEANURL', 1 ); | |
454 | } | |
455 | else { | |
456 | define('CIVICRM_CLEANURL', 0); | |
8d133ef2 | 457 | } |
eb049397 DL |
458 | } |
459 | ||
460 | // force PHP to auto-detect Mac line endings | |
461 | ini_set('auto_detect_line_endings', '1'); | |
462 | ||
463 | // make sure the memory_limit is at least 64 MB | |
464 | $memLimitString = trim(ini_get('memory_limit')); | |
465 | $memLimitUnit = strtolower(substr($memLimitString, -1)); | |
466 | $memLimit = (int) $memLimitString; | |
467 | switch ($memLimitUnit) { | |
468 | case 'g': $memLimit *= 1024; | |
469 | case 'm': $memLimit *= 1024; | |
470 | case 'k': $memLimit *= 1024; | |
471 | } | |
472 | if ($memLimit >= 0 and $memLimit < 134217728) { | |
473 | ini_set('memory_limit', '128M'); | |
474 | } | |
475 | ||
476 | require_once 'CRM/Core/ClassLoader.php'; | |
477 | CRM_Core_ClassLoader::singleton()->register(); |