Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73594 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 724 invoked from network); 4 Apr 2014 09:49:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Apr 2014 09:49:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:51351] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/C7-57266-6208E335 for ; Fri, 04 Apr 2014 04:49:27 -0500 Received: by mail-lb0-f170.google.com with SMTP id s7so2274439lbd.15 for ; Fri, 04 Apr 2014 02:49:23 -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=UxrFbk4ZOox1wegDzsVTAtvGjh4EL7O8LWSfQqTof5g=; b=OzLI9MlfRQhHPWSEleLMi+P5KMxBAT0MHSo6sNtdIUFfrWnRIpGSD2DWTbUvSR7rBh rvsWPdnMAUYe5mX97EW3YMAJ52mGj1NAyP+u4tcQY58yBPO0JZpBjJfON0Tt4hAxI7dC 2Dxt+gs14roQPGxEkYPJZSvunUsI6DchFlOl85zJ9SvV4qv5z7XyMGqN2w/8xgoJLKxQ DY3sH0DPlf4Ii5/+f0S+dx148+09b8xHx1kwLJmteBjezsv04RR7MhgdrmX3l7qmobMN Xw3fRGrLDykvgxawa+V6u58YIc2Iv82UOMU1V3mHDyYMWRqC1uOnzdhnnDLIJTAjV2yZ r1Fg== X-Received: by 10.152.36.73 with SMTP id o9mr7930499laj.30.1396604963695; Fri, 04 Apr 2014 02:49:23 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Fri, 4 Apr 2014 02:48:43 -0700 (PDT) In-Reply-To: References: Date: Fri, 4 Apr 2014 18:48:43 +0900 X-Google-Sender-Auth: vO7NXXzV9HAffRh7chCRr7BIGWA Message-ID: To: Andrey Andreev Cc: Julien Pauli , PHP Internals Content-Type: multipart/alternative; boundary=089e0160adf8c0e60004f6346e78 Subject: Re: session_reset() and session_abort() to send errors From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e0160adf8c0e60004f6346e78 Content-Type: text/plain; charset=UTF-8 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. 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(). Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e0160adf8c0e60004f6346e78--