Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
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
3namespace Olz;
4
5use Olz\Utils\EnvUtils;
6
7// Ampersand output
8ini_set('arg_separator.output', '&amp;');
9
10// Language for Date / Time output
11setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de_DE.UTF8');
12
13// Character encoding
14mb_internal_encoding('UTF-8');
15
16// Time zone
17date_default_timezone_set('Europe/Zurich');
18
19// Session security
20if (!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.
31class OlzInit {
32}