Hi all,

On Sat, Dec 19, 2015 at 7:33 AM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
> I would like to restart better session management for PHP 7.1.
>
> https://wiki.php.net/rfc/precise_session_management
>
> Although this RFC targets PHP 7.1, new session management
> could be applied to older releases also if majority of us agree.
> Please comment.

The patch is stable enough now.

https://github.com/php/php-src/pull/1734

I made patch a little simpler by removing per session basis timestamp
handling. It's system wide now. i.e. Cannot control timestamps per
session. If it is needed, it may be added later.

Since session expiration is managed by timestamp in session data, GC
may be performed when session closes. GC may take time and prevents
server outputs because session_start() is called at the beginning of
script execution usually. If GC is done at the end of
session(rshutdown), user gets the page content just like GC is not
performed while browser looks it's still loading page. I would like to
perform GC only when session is still active when request is shutting
down.

Consequences
 - If script executes session_commit()/session_destroy()/use read only
option, PHP will not perform GC. i.e. GC function is not called at
all. Therefore, probability of GC decreases and GC becomes less
likely.
 - If script uses multiple session storage, only the last session
storage performs GC. i.e. Previously used session storage may not call
GC function at all if this is done for site wide.
 - User will not see occasional page rendering delay by GC. (This is
the main reason of this change)

This behavior is preferred than current one. IMO.
Does anyone have problem with this?

--
Yasuo Ohgaki
yohg...@ohgaki.net

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to