Monday 15 June 2015

node.js socket.io php session whit out redis and memcached -



node.js socket.io php session whit out redis and memcached -

i have site delivered php , every user has session stored in php file when logged in.

my question is: possible, without redis or memcached, session php file node.js server or if not, how can redis memcached?

no matter how store php sessions, if want share info outside application, should served php application. gives flexibility of changing session handling later on, while avoiding writing custom session info parsing code on node.js application.

<?php session_id($_get['sessionid']); echo json_encode($_session);

then in node.js application, can fetch /getsessiondata.php?sessionid=0123456789abcdef or whatever. note must lock script downwards inaccessible except other applications. otherwise, opening nasty security hole. also, if aren't rotating session ids, should re-write session handler anyway hard re-play requests old session id.

php node.js sockets session socket.io

No comments:

Post a Comment