Re: [PHP4BETA] Glahrrgh... Sessions...

[email protected] (Boris Erdmann)
Newsgroups php.version4
Organization http://erdmann.cx
Message-ID <[email protected]>
Daniel Gustafsson wrote:
> 
> How is the session data handled when using the PHP module? Are all the
> registered variables stored in memory so that when one script changes it, a
> concurrent script gets the new value when accessing it?
> 
> Let's say we have a frameset of three frames, all frames perform a check to
> see whether a variable is set, if not, they perform some really heavy
> functions to get it set. Using the "CGI" there's a fairly good chance that
> all three scripts needs to set the variable (presuming the variables are
> loaded at startup, and dumped at the end of the call). Is this the same
> case with the module, or is it like a working application server?
> 

What you describe, i assume, is the typical concurrency problem
that many times has been reported to this list as "strange
behaviour with sessions" when doing performance tests.

As i see it you cant control the behaviour of concurrently runnig
scripts with the same session identifier (no locking mechanism
provided) in php4. Thus you will always run into corrupted data
using php4 sessions with frames - unfortunately.

This is why we at least introduced the concept of "read only" sessions
with PHPLIB.


Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.