0, 'path' => '/', // only set domain if it’s a real domain, not localhost/IP 'domain' => $cookie_domain ?: null, 'secure' => (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'), 'httponly' => true, 'samesite' => 'Lax', // safer default for normal sites ]); session_start(); } // Your flag: if ($isBeta) { $_SESSION["isBetaVirtuellerStundenplan"] = true; } elseif ($isProd) { $_SESSION["isBetaVirtuellerStundenplan"] = false; } else { // local dev fallback $_SESSION["isBetaVirtuellerStundenplan"] = false; } ?> upload | Virtueller Stundenplan