diff --git a/reference/session/examples.xml b/reference/session/examples.xml index 625dde9268..5bebe5283d 100644 --- a/reference/session/examples.xml +++ b/reference/session/examples.xml @@ -88,6 +88,24 @@ unset($_SESSION['count']); register_globals will overwrite variables in the global scope whose names are shared with session variables. Please see Using Register Globals for details. + + + File based sessions (the default in PHP) lock the session file once a + session is opened via session_start or implicitly via + session.auto_start. Once + locked, no other script can access the same session file until it has been + closed by the first script terminating or calling + session_write_close. + + + This is most likely to be an issue on Web sites that use AJAX heavily and + have multiple concurrent requests. The easiest way to deal with it is to + call session_write_close as soon as any required + changes to the session have been made, preferably early in the script. + Alternatively, a different session backend that does support concurrency + could be used. + +