[dokuwiki] Re: sessions
- From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sun, 7 Oct 2007 22:08:52 +0200
On Thu, 04 Oct 2007 13:52:15 +1000
Luke Howson <mail@xxxxxxxxxxxxxx> wrote:
> I know this probably gets asked with some regularity, but I couldn't
> find a good solution:
>
> I need to use a $_SESSION variable in one of my plugins, but dokuwiki
> has already session_write_close()ed it (in doku.php). I could hook
> into a header event and reopen it, but it would then remain open
> until the end of the script, which doesn't really leave the
> environment how I found it.
open it
write to it
close it again
> Is there a good reason dokuwiki closes the session when it does?
Yes. Session files are locked - only one process may access them at a
time. DokuWiki can spawn many processes simultanously for a single user
(a dokument with a few images will spawn one dou.php and several
fetch.php processes). Closing early makes sure we don't create
unnessary waiting times or deadlocks.
Andi
--
http://www.splitbrain.org
- References:
- [dokuwiki] sessions
- From: Luke Howson
Other related posts:
- » [dokuwiki] sessions
- » [dokuwiki] Re: sessions
- [dokuwiki] sessions
- From: Luke Howson