On Mon, Nov 8, 2010 at 1:33 PM, Alexandr Verbitsky
<verbitsky_alexa...@mail.by> 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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to