private static function cfgApply()
    {
        $iniMap = array(
            'gcMaxlifetime' => 'session.gc_maxlifetime',
            'gcProbability' => 'session.gc_probability',
            'gcDivisor'     => 'session.gc_divisor',
            'savePath'      => 'session.save_path',
            'useCookies'    => 'session.use_cookies',
            'useOnlyCookies'=> 'session.use_only_cookies',
        );
        foreach ($iniMap as $cfgKey => $iniKey) {
            \ini_set($iniKey, self::$cfgStatic[$cfgKey]);
        }
        \session_set_cookie_params(
            self::$cfgStatic['cookieLifetime'],
            self::$cfgStatic['cookiePath'],
            self::$cfgStatic['cookieDomain'],
            self::$cfgStatic['cookieSecure'],
            self::$cfgStatic['cookieHttponly'] // php >= 5.2.0
        );
        if (\ini_get('session.save_handler') == 'files' && !\is_dir(self::$cfgStatic['savePath'])) {
            \bdk\Debug::_warn('savePath doesn\'t exist -> creating');
            \mkdir(self::$cfgStatic['savePath'], 0700, true);
        }
        \session_cache_expire(self::$cfgStatic['cacheExpire']);
        \session_cache_limiter(self::$cfgStatic['cacheLimiter']);
        if (self::$cfgStatic['name'] != \session_name()) {
            \session_name(self::$cfgStatic['name']);
        }
        if (self::$cfgStatic['id']) {
            \bdk\Debug::_log('setting useStrictMode to false (session_id passed)');
            \ini_set('session.use_strict_mode', false);
            \session_id(self::$cfgStatic['id']);
        } else {
            \ini_set('session.use_strict_mode', self::$cfgStatic['useStrictMode']);
        }
    }