I'm using Nicolasff Redis-PHP extension(https://github.com/nicolasff/phpredis) for handling sessions on multipe servers. So I have changed my session handlers as suggested:
session.save_handler = redis
session.save_path = "tcp://host1:6379?weight=1"
On logout, I am destroying the session like so on one server:
setcookie('session_id', NULL, time() - 4800);
session_unset();
session_destroy();
session_write_close();
setcookie(session_name(),'',0,'/');
session_regenerate_id(true);
session_destroy();
But the problem is the session is only destroyed one servers and not the other. How can I ensure that session is destroyed on all servers?