Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73218 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9840 invoked from network); 17 Mar 2014 13:22:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2014 13:22:46 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.176 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 74.125.82.176 mail-we0-f176.google.com Received: from [74.125.82.176] ([74.125.82.176:37009] helo=mail-we0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/25-17561-527F6235 for ; Mon, 17 Mar 2014 08:22:45 -0500 Received: by mail-we0-f176.google.com with SMTP id x48so4465178wes.21 for ; Mon, 17 Mar 2014 06:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JzAPIGe8THJoQL3IwfQfbnkOJhc5Id8SX5Yisisyc+s=; b=DRd1YpBI0N+VomPH7g1BlZ+8GJAKrdb0AL6KUnd03kEdpsgsnobGaCoTQa6Jmoi5WL 4ME5X+xLlO9CIdTDKHy61l+XeYvGIDG6iGWzFcdHZTLV0B4nmHt7ZPAo3k87FcLI+Cqp jvIFwDP4UXwdEYhrLny4A9FpIOU8R8Hui5ShiOxG73NZYYrB77JOv5tPc5A91fWOxxbJ ydH0gK2Dre+ldkU7QgU0tMCpO2S6EISKq9fDvUsJu/9DH+68MeH5uDYryDMjfI34hav0 Ibnuu7CVDc7wu/oxJNLLuTfghfiCAckpydXq1Og3Tndk84TYnZJ4BxQd2JE330VS4tlY edEQ== MIME-Version: 1.0 X-Received: by 10.194.2.168 with SMTP id 8mr18425834wjv.8.1395062562292; Mon, 17 Mar 2014 06:22:42 -0700 (PDT) Received: by 10.217.122.65 with HTTP; Mon, 17 Mar 2014 06:22:42 -0700 (PDT) In-Reply-To: References: Date: Mon, 17 Mar 2014 13:22:42 +0000 Message-ID: To: Andrey Andreev Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b3a893a770a1604f4cd5018 Subject: Re: [PHP-DEV] Session: deprecating create_sid() method and add createSid()? From: leight@gmail.com (Leigh) --047d7b3a893a770a1604f4cd5018 Content-Type: text/plain; charset=ISO-8859-1 On 17 March 2014 10:23, Andrey Andreev wrote: > Hi Yasuo, > > There's no SessionHandler::create_sid() or > SessionHandlerInterface::create_sid() documented (see your own link to > the docs) ... since when is this available? > > I'm not sure if exposing it is a good idea anyway, why is it necessary? > > It was added in 5.5.1 - The PR was made 2 years ago by myself: https://github.com/php/php-src/pull/109 It's not documented because I'm lazy, (it's one of those TODO items that has become permanent), but I personally use it. The underlying method on the session interface has been there for a long time (10 years might even be accurate), but for some unknown reason, it was not exposed to userland when all of the other methods were. It is necessary for custom session handler classes because without it calls to session_regenerate_id() do not inform the session handler about the change of session id. The presence of this method allows you to capture session id regeneration, and update files, databases, etc. as necessary, and also allows you to fully customise the actual session id token that is used. Custom prefixes, body content, encoding charset, etc. Cheers, Leigh. --047d7b3a893a770a1604f4cd5018--