RE: [PHP4BETA] Session

From: Date: Wed, 08 Mar 2000 08:40:28 +0000
Subject: RE: [PHP4BETA] Session
Groups: php.version4 
Request: Send a blank email to php-version4+get-11734@lists.php.net to get a copy of this message
> I've never seen such an email. Do they exist? I wrote one when I was experimenting with session_set_save_handler(); I still need to create a dummy session and register a dummy value which I do something with (increment, set or something to that affect). The session module does this; 1) Read SID 2) Check if it's already there 3) If not, create it which is quite OK, except for the fact that when you do that against a SQL table of some sort, you end up with the following scenario: This is what my 'write' part of session_set_save_handler() does: 1) UPDATE session SET value='val' WHERE SID='sid'; 2) Check if there were any changes made. 3) If not, INSERT INTO session VALUES ( 'sid', 'val' ); 4) Return true if session got saved, false if not. "4)" needs to return what 'read' does (i.e. the session_encode() value). If it doesn't, there is no way for the session to be initialized at once. Correct me if I'm wrong, but I haven't had any luck initializing a session in one step writing them to a SQL table. Regards, Kenneth Mutka

« previous php.version4 (#11734) next »