I have a connection to a web server from a browser in a php script that works as a websocket server in the CLI.
I have a client that sends its session_id that was on the server, I know which user has this session.
It works great to read $ _SESSION of individual users.
I do (server side [my CLI code]):
$sess_ini = ini_get('session.save_path');
$save = file_get_contents("$sess_ini/sess_$sessionID");
session_id($sessionID);
$sessions = explode("|",$save);
$_SESSION['values'] = (isset($sessions[1])?
unserialize(trim(urldecode($sessions[1]))):array());
Then, when I manipulate $ _SESSION ['values'] on the server side of the CLI, it does not reflect on the client session, and the session is not processed. How to make the processed session be sent back to the client?
Thank!
source
share