So i have an application in php and nodejs. We have the user login etc. and we need sessions to identify the users.
So here is the challange, i have setup a session_set_save_handler in php but it seems like php adds something to my session id.
For example: Nodejs makes a session this is the unique string (the session id) 3763fb0e67340d47b1e4ead3eabb38011a10c5ef868527ea265def87d2db80a16fbc42e76ba50df2c09cc2fa7f3cbafa89dd99b85c4ae2190c91bf7069e4dbde
If i go to php to get this session it makes it like: s:3763fb0e67340d47b1e4ead3eabb38011a10c5ef868527ea265def87d2db80a16fbc42e76ba50df2c09cc2fa7f3cbafa89dd99b85c4ae2190c91bf7069e4dbde.tckNyYsYCYOBbPcdUBAsI7D77UE6Ma/9Y5VTMAn5umg
I see the unique id is in the string passed trough the session_set_save_handler But it seems like it is serialized but i can't figure out in what way. And what i can do to get out the original id generated by NodeJs.
Sure i can explode on the : and . to get the unique id set by nodejs but is this save? And why does php behaive like this?
How can i make the variable $sessionId passed throu the methodes set by session_set_save_handler.