Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73595 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5257 invoked from network); 4 Apr 2014 10:08:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Apr 2014 10:08:00 -0000 Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.160.170 mail-yk0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:63265] helo=mail-yk0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/C8-57266-F748E335 for ; Fri, 04 Apr 2014 05:08:00 -0500 Received: by mail-yk0-f170.google.com with SMTP id 9so2681776ykp.15 for ; Fri, 04 Apr 2014 03:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=93TwHbFbHlFwXDG2uz+bNpprR9M5tCo9m6Z7x3mf+yY=; b=JUZPI8JV91aa3nQ4WRHYJC6GOXl8Q4yv3J1qRxM7Sp9Df8Hq/qbiB+yPM2m5tamWsA +p5hrUCwJFzhe2e8bSRmrq6TZ4UZQrqec6SpcBokE7/T3WApSoiyviPQKc4yw7dg3Roe Zlkf3v89heocPpoKACIDjUV50Zxi6An1pEh/A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=93TwHbFbHlFwXDG2uz+bNpprR9M5tCo9m6Z7x3mf+yY=; b=IJuU0fdOLH8pP6WEvtmQKIJQF5YqvEcAgYT6aGyq6wb36R+OYfjTufhZUwbY6oMb8z UsWYrjpMBIMKg+gqV0qEC6iqxlliKUDklDa9YryqsdUiq0jJ2L0hPQK2vD7N5gJ+18Ss 9W08A2F7/rOnsZmXw63QRLx7ULCj5h9ReLQOxcC8SxArAHICD6eMRWk/IbZLNSj65vUB E3dh6nJefZNSubLJU7lrrB+/A01aqYr3JhJ8Nh846otv3vOR+QH5NJeO/FTF+Q1F6eBd yvsCGLCFj1ccrXqurhL4Wk2Ps20u+HM08MZfO+nsuJfnU93WbO0jXjZdoN6qbspWBiFs U3/w== X-Gm-Message-State: ALoCoQnv28XIrJjRCBftiZcU3oOFNGWmwKdLW3SfalGOt+SX9GiQvxLZ9AiJnJ9G72k6HiLT1Bc/ MIME-Version: 1.0 X-Received: by 10.236.220.72 with SMTP id n68mr11099708yhp.102.1396606076493; Fri, 04 Apr 2014 03:07:56 -0700 (PDT) Received: by 10.170.188.139 with HTTP; Fri, 4 Apr 2014 03:07:56 -0700 (PDT) In-Reply-To: References: Date: Fri, 4 Apr 2014 13:07:56 +0300 Message-ID: To: Yasuo Ohgaki Cc: Julien Pauli , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: session_reset() and session_abort() to send errors From: narf@devilix.net (Andrey Andreev) Hi, On Fri, Apr 4, 2014 at 12:48 PM, Yasuo Ohgaki wrote: > Hi Andrey, > > On Tue, Apr 1, 2014 at 6:20 PM, Andrey Andreev wrote: >> >> >> Well, I just re-checked it and does indeed just call >> >> php_session_initialize(), so what's the point? Shorthand for >> >> session_abort() && session_start() ? >> > >> > >> > Yes, it's an API for it. >> > It's more efficient than user land functions as it requires needless >> > close and open (and initialization required to open). >> >> I'm confused now, does it call open() or does it not? >> If it doesn't - it's unsafe. > > > It's safe as long as handler locks data during read/write. > Example is memcached save handler with unlocked session. I had something other in mind and you didn't really answer my question, but ... there you have it - it can be unsafe even by your own words. :) >> If it does - it's unclear, redundant and optimizes by silently >> discarding already open resources (without properly closing them). >> >> Either way, I like efficiency but I also see it as flawed. > > > Save handler may lock/unlock session data. There is no standardized > way for it. > > Since there would not be lock option for session manager, I don't mind > removing it. There is not much point to have it without lock option for > session manager. I would like to have session_gc() than session_reset(). This sounds a bit like you're proposing some kind of a trade agreement. When you put it that way, I'd also rather have session_gc() instead of session_reset(), but that's not the point. My initial argument was that these features need to be brainstormed here on internals and there was no discussion about them at all. Cheers, Andrey.