note 90968 deleted from function.session-start by peehaa
| From: | peehaa@php.net | Date: | Fri, 09 Dec 2016 22:16:20 +0000 |
| Subject: | note 90968 deleted from function.session-start by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208344@lists.php.net to get a copy of this message | ||
Note Submitter: kavih7 at yahoo dot com
----
I ran into a problem that has a solution that may not be quite intuitive to people (well, atleast it
wasn't for me). I had one script that called session_start() and that script would run for an
indefinite amount of time. I had a second script that would also call session_start(), but would
only run for a few seconds each time it is called.
Here is where the problem occurs: Once session_start is called from the long living script, no other
script can call session_start until that long running script calls session_commit()
(session_write_close()) or ends.
In any case, this may have seem very intuitive to others, but having an abstracted system in place,
I never see the session management at the script level, so it was hard to figure out what was
locking any other requests.
Hope this helps others.