Sessions - lack of support for endingn a session and beginning a new one.

From: Date: Mon, 05 Jun 2000 17:13:53 +0000
Subject: Sessions - lack of support for endingn a session and beginning a new one.
Groups: php.dev 
Request: Send a blank email to php-dev+get-20258@lists.php.net to get a copy of this message
I'm not sure what all of your positions are on this matter, but I'm sure it's been brought up before. Currently, PHP4 sessions seem to be limited in the fact that you can not close a session and the open a new one. You can destroy the data, but once you start a session, that session is there for the life of the script. You can not end it and begin a new session. Specifically, I would like to be able to load a stored session using the session id associated with a username and password, say stored in a MySQL table... I could populate the default cookie variable $PHPSESSID and then call session_start(), but that pretty much precludes the ability to autostart the sessions or at least call it from a global prepend file. At the very least, I'd have to do some kludgy stuff to make that work properly. Also, to resume a session using an ID that wasn't passed by URL or cookie, you have to populate the $PHPSESSID variable, before calling session_start(). Would it not be useful to have an optional parameter for session_start() that would take a session id to resume? Is there a reason this functionality wasn't added or was it overlooked? Am I missing something important here? Regards, Daniel Beckham dealnews.com, Inc.

« previous php.dev (#20258) next »