Re: Recursing sessions?

From: Date: Mon, 03 Jul 2006 19:48:05 +0000
Subject: Re: Recursing sessions?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-239097@lists.php.net to get a copy of this message
On Sat, July 1, 2006 5:30 pm, Mark wrote: > If the frames do any sort of processing on the session information, as > is > the case with squirrelmail, the last session to exit will overwrite > all the > changes made by prior frames. This can corrupt session information or > lose > versions of information. > > It is a HUGE problem that I don't see ANYONE addressing. Ah. Now I know which question you are asking... The built-in PHP session handler handles this by LOCKING the session for writing until it is closed and done for each request. The simplistic example for user-defined handling sessions in the manual does not, in fact, address this directly. The User Contributed Notes, last I checked, did have some rather sarky comments about this issue, and some suggestions for how to fix it. If you are using a database, for example, locking via some mechanism in the DB is probably a viable solution. Wrapping it all in a Transaction is probably overkill, for example, but would work. Of course, the simplest solution remains: Don't use frames. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#239097) next »