session_cache_limiter example

$container = new Container();
$container->register(new ContainerProvider($config));

/** @var Slim $app */
$app = $container->offsetGet('slim.app');

// After instantiation $sessionPath = str_replace('index.php', '', $app->request()->getScriptName());
$app->config('cookies.path', $sessionPath);

if (!isset($_SESSION)) {
    session_cache_limiter(false);
    session_set_cookie_params(600, $sessionPath);
    session_start();
}

if (!isset($_SESSION['parameters'])) {
    $_SESSION['parameters'] = [];
}

if (isset($_SESSION['databaseConnectionInfo'])) {
    $connectionInfo = $_SESSION['databaseConnectionInfo'];

    
Home | Imprint | This part of the site doesn't use cookies.