-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap.php
45 lines (37 loc) · 1.27 KB
/
bootstrap.php
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
<?php
/**
* Tine 2.0
*
* @package Tinebase
* @license http://www.gnu.org/licenses/agpl.html AGPL Version 3
* @author Lars Kneschke <l.kneschke@metaways.de>
* @copyright Copyright (c) 2008-2012 Metaways Infosystems GmbH (http://www.metaways.de)
*
*/
// All server operations are done in UTC
date_default_timezone_set('UTC');
// disable magic_quotes_runtime
ini_set('magic_quotes_runtime', 0);
// display errors we can't handle ourselves
error_reporting(E_COMPILE_ERROR | E_CORE_ERROR | E_ERROR | E_PARSE);
ini_set('display_errors', 1);
ini_set('log_errors', 1);
// iconv_set_encoding throws a deprecated exception since 5.6.*
// Zend 1 still uses that, but at least we can effort to fix that.
if (PHP_VERSION_ID > 50600) {
ini_set('default_charset', 'UTF-8');
} else {
// set default internal encoding
if (extension_loaded('iconv')) {
iconv_set_encoding('internal_encoding', "UTF-8");
}
}
if (extension_loaded('mbstring')) {
mb_internal_encoding("UTF-8");
}
// intialize composers autoloader
$autoloader = require __DIR__ . '/vendor/autoload.php';
// initialize plugins
require 'init_plugins.php';
// activate our own error handler after autoloader initialization
set_error_handler('Tinebase_Core::errorHandler', E_ALL | E_STRICT | E_DEPRECATED);