I'm using session_set_save_handler()
to keep my session in Redis, and everything works perfectly, except one thing.
after hours and hours of pulling my hair I thought I should开发者_开发技巧 just ask someone.
so, on the server side, I set the session life for X minutes. on each page refresh, the session life is set to X minutes, but on the browser the cookie expires after exactly 30 minutes after the first page load. how can I force the cookie life to be extended on each page refresh like on the server side.
any thoughts?
Try something like:
session_start();
setcookie(session_name(), session_id(), strtotime('NOW+30MINUTES'));
精彩评论