L
L
lxfr2014-02-05 14:02:37
PHP
lxfr, 2014-02-05 14:02:37

What format does PHP use when saving sessions in REDIS (and not only)?

For example, here is the value of the PHP session record from Redis:

decec07f4e6d99d1605c8c2780ede63b__id|s:1:"3";decec07f4e6d99d1605c8c2780ede63b__name|s:15:"lalala";decec07f4e6d99d1605c8c2780ede63b__states|a:0:{}x|i:1;

How to parse it? It must be some kind of format.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dzubchik, 2014-02-05
@lxfr

If the php version is not critical for you, then I advise you to install 5.5.4 or higher, since the new php_serialize serializer is supported there. Then you can use ready-made solutions for nodes and python . Here's what the manual says about it .

D
Dmitry, 2014-07-07
@thewind

function session_decode($string) - parses this string into the global $_SESSION array. Unfortunately, it does not return a result.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question