It's better when it's simple

User Tools

Site Tools


Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community

Follow us on Facebook, Twitter and other social networks.

Our Privacy Policy


Session handling


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