note 8483 added to Session handling functions

From: Date: Wed, 13 Sep 2000 14:24:21 +0000
Subject: note 8483 added to Session handling functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-4915@lists.php.net to get a copy of this message
Session handling sequence in frames. If I have page 0 containing frames 1, 2, 3, the session handlers wil run in this sequence: frame 0 session_open frame 0 session_read frame 0 session_write frame 0 session_close frame 1 session_open frame 3 session_open frame 2 session_open frame 3 session_read frame 3 session_write frame 3 session_close frame 1 session_read frame 2 session_read frame 1 session_write frame 1 session_close frame 2 session_write frame 2 session_close The main page always completes before the pages in the frames. The handlers for the pages in the frames overlap. That means variables updated in the framed pages will end up with variable results. If there were a session_save and/or session_close, pages could control access better to reduce overlap. If the database has record locking, the session updates could be sequenced. I am using MySQL which has table locking and table locking is too drastic for this application. My current approach is to remove the session write from page 1 - 3. If I need to save something in them, I use a conventional database write keyed on the session. That means a table per frame. http://www.php.net/manual/ref.session.php

« previous php.notes (#4915) next »