note 46608 deleted from function.session-start by bjori

From: Date: Sun, 16 Apr 2006 00:20:46 +0000
Subject: note 46608 deleted from function.session-start by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108208@lists.php.net to get a copy of this message
Note Submitter: tech at insights dot net dot au ---- I am sure anybody that is trying to use IIS and PHP is throughly annoyed with the session_start() bug that recreates a new session every time it is accessed. The problem is the session_id isn't passed before the session_start() so it creates a new session. So a simple sollution is: $id = 473483478383834; session_id($id); session_start(); Another way that is a bit more dynamic using a Cookie to hold the session_id: if (isset($SessID)){ session_id($SessID); } session_start(); header("Cache-control: private"); // IE 6 Fix. setcookie("SessID", session_id(), time() + 3600); There are probably much better ways of doing this but for use with my offline Win/IIS setup it seems to be fine.

« previous php.notes (#108208) next »