Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 11 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
OlzInit | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace Olz; |
4 | |
5 | use Olz\Utils\EnvUtils; |
6 | |
7 | // Ampersand output |
8 | ini_set('arg_separator.output', '&'); |
9 | |
10 | // Language for Date / Time output |
11 | setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de_DE.UTF8'); |
12 | |
13 | // Character encoding |
14 | mb_internal_encoding('UTF-8'); |
15 | |
16 | // Time zone |
17 | date_default_timezone_set('Europe/Zurich'); |
18 | |
19 | // Session security |
20 | if (!headers_sent()) { |
21 | ini_set('session.gc_maxlifetime', 2419200); // keep one month |
22 | ini_set('session.cookie_httponly', 1); |
23 | $private_path = EnvUtils::computePrivatePath(); |
24 | if ($private_path !== null) { |
25 | session_save_path("{$private_path}sessions/"); |
26 | ini_set('session.cookie_secure', 1); |
27 | } |
28 | } |
29 | |
30 | // Dummy class for PHP to STFU. |
31 | class OlzInit { |
32 | } |