Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78795 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 841 invoked from network); 6 Nov 2014 08:42:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2014 08:42:37 -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.218.51 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.51 mail-oi0-f51.google.com Received: from [209.85.218.51] ([209.85.218.51:40831] helo=mail-oi0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/1D-28384-C743B545 for ; Thu, 06 Nov 2014 03:42:36 -0500 Received: by mail-oi0-f51.google.com with SMTP id g201so433520oib.10 for ; Thu, 06 Nov 2014 00:42:33 -0800 (PST) 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=EEx9oI72vujQXiVjcfOmZUPS4HLlr2yVR8NMf3mVdUM=; b=spDZfIo6hJAzqgjupfFiUWhTrqHOUdAMv3lcfi0/bkjyKIogCsbSXPgcTDA7z23af3 tEHbEtb3QiJKkesqfNioq71WkxvoEerB4DoggNBAjnoZlV/t1aiGsf7i39jSsCNxVm1+ RQZWldGovYmd4gfLZP/Z3DemtAcAFFCRWlO+o= 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=EEx9oI72vujQXiVjcfOmZUPS4HLlr2yVR8NMf3mVdUM=; b=P2ipbLXO3G3uqrpUO92XshgCUOO+QxFpIXsL/QojOEa+yamL5jZHi+pPlBjwtYvP7f ERV6zWN5Ij+1rXxLDrlUmjZELBm2KTSzdfpEDUvVfyEaMJGUMSLxeeFet7fWolj3pLzR 33KNkYqtk2Bm3jwqkou5Ubcli2gh4X023pJwsxA0LLMZ85wtcfCZgJYsYg56OxSV7Kzh 17Qd5EV6NHmzejuS0s1vZ8scipn28t82ilXQMTaGZbLvlx5+LVRuGTfnz7T+9TChN8zZ 5uj3mDnG446UhQnDlc2xuGuubdGNQ7Y+naQEVP8eSNrNnOA8AMd62a29d2bbBx6X5TYX VmTA== X-Gm-Message-State: ALoCoQlTFs/3q5hKF8MfMgkwXF5zdkE4tSPFQbo//9d599LOIH+eFW+V0TiD0zCk7GkPrywKVWwS MIME-Version: 1.0 X-Received: by 10.202.49.65 with SMTP id x62mr2304244oix.17.1415263353306; Thu, 06 Nov 2014 00:42:33 -0800 (PST) Received: by 10.202.75.148 with HTTP; Thu, 6 Nov 2014 00:42:33 -0800 (PST) In-Reply-To: References: Date: Thu, 6 Nov 2014 10:42:33 +0200 Message-ID: To: Yasuo Ohgaki Cc: Damian Wadley , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Lazy writing in the session, session-lock-ini, and bug #68331 From: narf@devilix.net (Andrey Andreev) Hi, On Thu, Nov 6, 2014 at 4:02 AM, Yasuo Ohgaki wrote: > HI all, > > On Thu, Nov 6, 2014 at 6:30 AM, Yasuo Ohgaki wrote: > >> On Wed, Nov 5, 2014 at 10:54 AM, Damian Wadley wrote: >> >>> Apparently this caused >>> problems for some people as they made 68331 a few days ago. >>> >> >> Just a quick note for this. The user would like to access session >> data(session handler) >> regardless of data modification. I suppose it could be solved if session >> has user space >> "update" handler as I suggested originally. >> >> Alternatively, session_write_close()/session_commit() may be changed, so >> that it >> is called unconditionally during shutdown. I have to read the code to be >> sure if this is possible. >> >> BTW, anyone know the reason why the user need to call >> session_write_close()/session_commit() >> unconditionally? Accounting, perhaps? >> > > The issue user has reported could be solved easily by calling write API > during shutdown, IIRC. > An explicit flag for this might be needed. There already is such explicit flag in PHP 5.4's OOP version of session_set_save_handler(). The linked test script in the bug report also explicitly registers session_write_close() as a shutdown function. The problem isn't that there's no call, it's that _the call itself is ignored_. Cheers, Andrey.