note 18679 deleted from function.session-start by sniper

From: Date: Thu, 31 Oct 2002 00:54:58 +0000
Subject: note 18679 deleted from function.session-start by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38798@lists.php.net to get a copy of this message
function check_session() { //global $_SESSION; session_start(); if (isset($_SESSION["id"])) return true; else { unset($_SESSION); session_destroy(); return false; } } $sess = check_session(); if (isset($_POST["button"]) && !$sess) { session_start(); $_SESSION["id"] = 1; $_SESSION["name"] = "name"; header("location: http://www.php.net/"); exit(); } if you enable global $_SESSION, apache fails (segmentation fault)

« previous php.notes (#38798) next »