Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86846 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86207 invoked from network); 24 Jun 2015 13:57:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jun 2015 13:57:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=are.you.winning@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=are.you.winning@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: are.you.winning@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:35894] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/10-19819-837BA855 for ; Wed, 24 Jun 2015 09:57:12 -0400 Received: by wguu7 with SMTP id u7so37055090wgu.3 for ; Wed, 24 Jun 2015 06:57:09 -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:date:message-id:subject :from:to:cc:content-type; bh=w1tkMqavJJCp5yhmJBIktG+SGM2UKN1ja2Y4pBzrxj0=; b=E1htMZ1/rRSti78L/OpV0ELtoOThietCUOjBmCwDieW0apSJ5xI2nC64Nmg1sOPA46 6tmydGXT0Yjdc+uFK0Inbq731vKfBlan9EcTt92vpAggTLOU1bPa8ajNlwGlfGVF2VZC E13T+c5lG0Sa64WmRCjhd2NYT/OBfN/vSMo+yPJRLWGyW3ZNyhDPOLzuODduGm5BligM fRMiRPgJbA0s/5QzwK89NDPZgiBE+LOu+YmANBbRHaf98I6i47IyQOTanj4COoyur6oS fczYTghGOs8q6pc6+fBTpf0qq+MxKiInWyKntZQZOj/N+l108l8gwXCtkzyISI5YDieg mB7Q== MIME-Version: 1.0 X-Received: by 10.194.134.74 with SMTP id pi10mr67954610wjb.99.1435154229731; Wed, 24 Jun 2015 06:57:09 -0700 (PDT) Sender: are.you.winning@gmail.com Received: by 10.180.186.103 with HTTP; Wed, 24 Jun 2015 06:57:09 -0700 (PDT) In-Reply-To: References: Date: Wed, 24 Jun 2015 14:57:09 +0100 X-Google-Sender-Auth: L-pnzF2g_PPcf4T0C9Yz___CjeU Message-ID: To: Eric Stenson Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e01227ed60fa56b051943e2d2 Subject: Re: [PHP-DEV] [Q] Session provider & returning FAILURE from PS_OPEN_FUNC? From: cw@daverandom.com (Chris Wright) --089e01227ed60fa56b051943e2d2 Content-Type: text/plain; charset=UTF-8 On 23 June 2015 at 23:09, Eric Stenson wrote: > Quick behavioral question: > > If an extension is implementing a Session handler, and returns FAILURE > from its PS_OPEN_FUNC(), will the extension receive subsequent > PS_READ_FUNC()/PS_WRITE_FUNC() calls? > > Also, if an extension returns FAILURE from its PS_OPEN_FUNC(), will the > extension receive a PS_CLOSE_FUNC()/PS_DESTROY_FUNC() call? > No to all, if you return FAILURE then it results in an E_ERROR before the point where the session state is marked as active, i.e. it's fatal, so no further calls to anything will be made. http://lxr.php.net/xref/PHP_TRUNK/ext/session/session.c#488 I'd argue that this shouldn't be fatal, but that's another topic for another thread. > > If there are any docs on writing a Session handler, please let me know! > I'm happy to RTFM... > Not officially as far as I am aware but someone else may know different. There may be some unofficial resources on the net if your Google-fu is good enough, a cursory search didn't turn anything up for me. > > Thx! > --E. > --089e01227ed60fa56b051943e2d2--