Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50129 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26985 invoked from network); 8 Nov 2010 19:15:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Nov 2010 19:15:30 -0000 Received: from [127.0.0.1] ([127.0.0.1:15010]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id CD/95-01559-15C48DC4 for ; Mon, 08 Nov 2010 14:15:29 -0500 Authentication-Results: pb1.pair.com header.from=arraypad@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arraypad@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arraypad@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:52804] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/95-01559-F8B48DC4 for ; Mon, 08 Nov 2010 14:12:15 -0500 Received: by gwj23 with SMTP id 23so111490gwj.29 for ; Mon, 08 Nov 2010 11:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=G5uD1UmVwzUpyrWoyC4jPqhZioxOuobZUulx9l0ljwQ=; b=PvxxjBm/+TjoJZrahd0U1U9D+66u+yka3qsduSjd+azY3q1oYypRu3o7B97xTIEHvz jZPlh+OlV+U6tzvzWeXvuNb1vHwKvxclG4p3h9TYpT+oNP8YwHl98+dVxNuuV5EvNddb sUoFO66exn5aGir/aU+UQQBjhGYMrFR1FkWT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=jxseWTHbEMmS13JJzR0zkbwGqXw3Mnv1Tl1yRsVVtYcHf+0sD0FK2H6TI9TmDhgQKd mVbEp+KBdNaivoP6FTWLJz2vHSZC5zHUFCyh8jvODeCDrwVC7EloIDp+URsDaJRg46iZ +8sdS7nDN0YA0+k/rMKnJLcOw2/F5VMlBBJtA= MIME-Version: 1.0 Received: by 10.42.227.130 with SMTP id ja2mr4359179icb.25.1289243532350; Mon, 08 Nov 2010 11:12:12 -0800 (PST) Received: by 10.42.170.70 with HTTP; Mon, 8 Nov 2010 11:12:12 -0800 (PST) In-Reply-To: <4CD7FC0F.7010304@mail.by> References: <4CD7FC0F.7010304@mail.by> Date: Mon, 8 Nov 2010 19:12:12 +0000 Message-ID: To: Alexandr Verbitsky Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Bug #52477 From: arraypad@gmail.com (Arpad Ray) On Mon, Nov 8, 2010 at 1:33 PM, Alexandr Verbitsky wrote: > Hi all. > I am investigate in the reason Bug #52477 (http://bugs.php.net/52477) and > found that it appear because in PHP 5.2.14 there are two constant > PS_DELIMITER and PS_UNDEF_MARKER. The value it's constants not allow to use > in the root key of SESSION elements. > Also in the version 5.2.0 was Bug #40274 (http://bugs.php.net/40274). For > its decision the code has been added in PS_ENCODE_LOOP to pass elements with > numerical keys. > > I not understand for what is necessary special algorithm for serialize roots > elements. Why dont using php_get_session_var and php_var_unserialize > functions for PS(http_session_vars) directly? Where i can read about it in > manual? Hi, The special algorithm was necessary because the root keys could be used in session_register() as global variables, which have certain naming restrictions. This is no longer necessary since session_register() has been deprecated. I wrote a patch a while ago to use php_var_serialize but the complication emerged of adding a version number to the serialized string (otherwise migrating existing sessions is awkward). I haven't had time to work on it but can dig up the latest code if you'd like, it will be another few weeks until I can pick it up again. Regards, Arpad