mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Add a note about how the files session backend locks session files.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@331493 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d443751d6a
commit
71ee784aed
1 changed files with 18 additions and 0 deletions
|
@ -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 <link linkend="security.globals">Using Register Globals</link> for details.
|
||||
</para>
|
||||
</warning>
|
||||
<note>
|
||||
<para>
|
||||
File based sessions (the default in PHP) lock the session file once a
|
||||
session is opened via <function>session_start</function> or implicitly via
|
||||
<link linkend="ini.session.auto-start">session.auto_start</link>. Once
|
||||
locked, no other script can access the same session file until it has been
|
||||
closed by the first script terminating or calling
|
||||
<function>session_write_close</function>.
|
||||
</para>
|
||||
<para>
|
||||
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 <function>session_write_close</function> 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.
|
||||
</para>
|
||||
</note>
|
||||
</section>
|
||||
|
||||
<section xml:id="session.idpassing">
|
||||
|
|
Loading…
Reference in a new issue