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