Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81354 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10347 invoked from network); 29 Jan 2015 07:01:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2015 07:01:29 -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.192.46 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.46 mail-qg0-f46.google.com Received: from [209.85.192.46] ([209.85.192.46:43062] helo=mail-qg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/10-09212-7CAD9C45 for ; Thu, 29 Jan 2015 02:01:28 -0500 Received: by mail-qg0-f46.google.com with SMTP id i50so24517131qgf.5 for ; Wed, 28 Jan 2015 23:01:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=W4sb2u1mIDWQgFm/boxvOPaAqTQSxptRtaogBo1AJYM=; b=vco4/Lr7XusjA0ec8sUmL/DnYqkt0YxZmA9QUiNwKVA10aJENbgLVZkKJ9Lfnt2yZH L87zRCAt9+Z1YrsCuPrIDE2utIBGkXf/tVKm5GHOt4PGQ5iBhcZDrLE6xC+4m7ihJf4V KPw6r4fxSyo9TMZsrnokGNjhwMh3PvlkwfbtHUIEB3IaaFm4Luh/bmNjdZGuJBGq/btM NLtGijW+/Q+1npB4A5w8gVQoK6OyiaF48VoTqpMQ5wh2uGITWuz4zVpYG8N2a5sWl72S fzXSjzRM6N02eMDLGL1027x8q0UJrQCAi/YWz7Wrwv3GKLYcTVbHRRvHMp25dsci7nZE TBVQ== X-Received: by 10.140.20.226 with SMTP id 89mr655743qgj.43.1422514884800; Wed, 28 Jan 2015 23:01:24 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Wed, 28 Jan 2015 23:00:44 -0800 (PST) Date: Thu, 29 Jan 2015 16:00:44 +0900 X-Google-Sender-Auth: V9JZn7W6SuPxFlpBTaHW6rdNpsY Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c1257e6575a6050dc50e9d Subject: Session: PS(mod)->create() or PS(mod)->read() parameter? From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c1257e6575a6050dc50e9d Content-Type: text/plain; charset=UTF-8 Hi all, session save handler developer especially, I would like to improve session save handler module API for PHP7. When new session data is created, some save handlers need to create new session data explicitly. e.g. RDBMS based save handler. New session module validates session data existence via PS(mod)->validate_sid(). When new data record is needed, RDBMS needs INSERT query to create a record. Since record existence is checked by validate_sid(), SELECT query in PS(mod)->read() that checks record existence is not required if there is proper API. Note: validate_sid() is there to enforce secure save handler implementation. One option is to have PS(mod)->create() for new session. The other is additional new_id flag parameter for PS(mod)->read(). Both change requires API change, but it wouldn't be issue for PHP7. Have new create API or new parameter for PS(mod)->read()? I don't care which. If there is no comment, I'll add new parameter since it's simpler. Comments are appreciated. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c1257e6575a6050dc50e9d--