Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73157 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62822 invoked from network); 14 Mar 2014 10:39:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2014 10:39:21 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.48 mail-la0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:44117] helo=mail-la0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/E4-47923-85CD2235 for ; Fri, 14 Mar 2014 05:39:21 -0500 Received: by mail-la0-f48.google.com with SMTP id gf5so1629653lab.35 for ; Fri, 14 Mar 2014 03:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=9zM3u21r6LdTpWktIfNekY5eL9Ll0dN6vSkL2V77pDc=; b=0wDcZXlp6y3NwSdTpZY/xvY0Y2BdSSQWYRjO9TBT8r2l1YoAKSDfcFi2wxSLeIoDIx dF9QkVHClroIbM6Hn7rA0KwMDbV0GI2OnXBGkiAVQRHApdgwjBo427aN6GIzFBMX8qtm E2PMoDkiuR06svEfsX5rJziMUXs3poETSZ951X9w2bbQjv/gL/hZ63X/MzDW1KYrHbMY FIBJgsbcyGhOzRiW9HgCPe+JYVdsdHJAUleOCmb9Dld7ruMjFyoqPNKza3xwNz0oFZ+H yv4NEALBG9OnWAFLTpfjndtlJxRBbiZZkkL2u0ebsZtcT7yAWV8UIZNc0rEEU0UYOW+4 YWTA== X-Received: by 10.152.87.71 with SMTP id v7mr5054956laz.10.1394793557739; Fri, 14 Mar 2014 03:39:17 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Fri, 14 Mar 2014 03:38:37 -0700 (PDT) In-Reply-To: References: Date: Fri, 14 Mar 2014 19:38:37 +0900 X-Google-Sender-Auth: jOVK9nQaRtUvdcdyFSpUejJo3g0 Message-ID: To: Andrey Andreev Cc: Pierre Joye , Patrick Schaaf , internals Content-Type: multipart/alternative; boundary=001a11c355b28b4d8d04f48eaef4 Subject: Re: [PHP-DEV] Re: Revert session_serializer_name(), session_gc() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c355b28b4d8d04f48eaef4 Content-Type: text/plain; charset=UTF-8 On Fri, Mar 14, 2014 at 7:30 PM, Yasuo Ohgaki wrote: > On Fri, Mar 14, 2014 at 7:07 PM, Andrey Andreev wrote: > >> This is broken, consider the following (multiple tab/ajax/whatever >> concurrency) scenario: >> >> Request1: session_start(['read_only' => TRUE]); >> Request2: session_start(); unset($_SESSION['logged_in']); >> session_commit(); >> Request1: still logged in >> >> ^ This screams "danger". >> > > I think all of us know what it does. > > >> >> It's also, redundant ... do you really believe you'd get +1 votes for >> that feature if the voters were *really* aware that this would be just >> an alias for (sesson_start() && session_commit()) ? >> > > It's not alias. It's much more efficient. > > >> I don't think so. This is simply not what "read only" means which >> makes this whole thing very misleading and if people who were supposed >> to review the feature got confused by it, imagine what happens in >> userland. >> > > I might not explain well enough in the RFC, but most of use understood > it's a faster version of session_start();session_commit(). > > Calling session_commit() right after session_start() is common > optimization technique. Making it more efficient worth it. > > I think there is no point to write back to the session data while > programmer only needs to read the data. Since > session_start();session_commit(); is optimization technique, making it more > efficient makes sense. > > Regards, > Pressed send button before re-reading. I think it could be understood what I mean. -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c355b28b4d8d04f48eaef4--