ironpinguin / serialized-php-parser

Simple parser for serialized php strings in java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

not supported main key array

spring-pro opened this issue · comments

if i have
$_SESSION["user"]
and
$_SESSION["device"]
then in session file will be:
user|a:3:{s:12:"phone_number";s:10:"9300000166";s:7:"user_id";i:2397;s:3:"sid";s:26:"vv5ua3kpinpi8lq7aqg4aho3v3";}device|a:3:{s:4:"type";s:1:"2";s:4:"IMEI";s:15:"123456789012345";s:6:"serial";s:12:"AAA123F12345";}
so serialized-php-parser can't parse it

commented

The PHP session is not encoded using serialize / unserialize but using session_encode / session_decode.

Both use different (while similar) encoding schemata. serialized-php-parser only supports the former.

Update: You can of cause use PHP's session handling functionality to overwrite the default behaviour and use serialize / unserialize instead :-)