Re: PHP 4.0 Bug #3827: synchronizing access to sessions

From: Date: Tue, 14 Mar 2000 14:14:49 +0000
Subject: Re: PHP 4.0 Bug #3827: synchronizing access to sessions
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-16789@lists.php.net to get a copy of this message
: > > I tried to lock the session file after session_start() : > > and release the lock before end of my script, but I'm : > > not sure if this is a good solution (and if it's, : > > maybe PHP could provide some function for session locking). : > > : > > Any ideas? : > : > What do you mean by overwrite? Do registered variables disappear? : : Yes, they dissapear. I think it can be caused by this sequence : of events: : : 1, frame1 reads session file : 2, frame2 reads session file : 3, both of them change some registered variables : 4, frame1 saves its changes into session file : 5, frame2 saves its changes into session file : 6, session file contains only variables saved by frame2 Maybe Netscape opens two connections at once, and since there is no session in the beginning (the cookie or session ID is not set yet!) both frames will end up in different sessions.... Enjoy! Faisal

« previous php.dev (#16789) next »