Req #47964 [Com]: session_write_open request
| From: | post at bjornjohansen dot no | Date: | Thu, 26 Mar 2015 12:36:10 +0000 |
| Subject: | Req #47964 [Com]: session_write_open request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191618@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=47964&edit=1
ID: 47964
Comment by: post at bjornjohansen dot no
Reported by: corin dot lawson at gmail dot com
Summary: session_write_open request
Status: Wont fix
Type: Feature/Change Request
Package: Session related
Operating System: *
PHP Version: *
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
The issue with using session_start() to reopen a session for writing is that it resends the session
cookie, even if the HTTP headers have been sent.
This means that currently, one have to use output buffering.
If something like session_write_open() existed, one would be able to write to the current session
even after the HTTP headers have been sent.
Previous Comments:
------------------------------------------------------------------------
[2013-08-10 08:24:27] yohgaki@php.net
I think you are able to following with current maintained PHP. (5.4/5.5)
session_start()
session_commit() // Slias of session_write_close()
session_start() // Start session again.
If not, please open new bug report (or it may be here, so search bug db before
submiting)
I also implemented session_abort() which just ends session w/o writing. It may
be useful to you. It available from 5.6 or later, though.
------------------------------------------------------------------------
[2012-03-31 03:30:50] yohgaki@php.net
This issue is related to
session_start();
seseson_write_close();
session_start();
problem.
------------------------------------------------------------------------
[2009-04-14 04:22:20] corin dot lawson at gmail dot com
Description:
------------
The function session_write_close is very useful to permit concurrent page loads by releasing the
lock on the session data ASAP. It would be useful to have a function to get that lock back and read
session data again, namely session_write_open or session_read_write_open. (Also,
session_read_only_open would be desirable for comprehensiveness.)
Currently, session_start can be used but this has the unnecessary effect of setting/sending the
cookie again.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=47964&edit=1