DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:session_handling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

devel:session_handling [2017-08-02 16:34]
og created
devel:session_handling [2017-08-02 16:56] (current)
og
Line 2: Line 2:
  
 FIXME FIXME
 +
 +DokuWiki opens the session in ''inc/init.php''. After some things are initialized it is closed again. This is because PHP locks the session and this session lock may halt background requests like images, ajax, etc.
 +
 +Depending on when your plugin runs, the session might already have been closed. You can still read a closed session's variables but writing will have no effect. If you need to write to it, you need to call ''session_start()'' again, use the session as usual and close the session with ''session_write_close()'' again.
 +
 +:?: When in code does it close? How to detect? If one tries to (re)open a session which is currently not closed, he get's an error.
 +
 +:!: To re-open a session, no chars must be sent to the clients browser.
  
devel/session_handling.txt ยท Last modified: 2017-08-02 16:56 by og