Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not supported main key array #5

Open
spring-pro opened this issue Sep 3, 2018 · 1 comment
Open

not supported main key array #5

spring-pro opened this issue Sep 3, 2018 · 1 comment

Comments

@spring-pro
Copy link

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

@ooxi
Copy link
Collaborator

ooxi commented Sep 3, 2018

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants