From b6c457247052c36a60c4d3b53c2256db22a8a62c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 8 Jun 2018 11:55:02 +0200 Subject: update to 4.0.2 open https://github.com/phpredis/phpredis/pull/1365 use PHP_BINARY instead of php and allow override report https://github.com/phpredis/phpredis/issues/1364 missing files in pecl archive add new redis.session.lock* options in provided configuration --- regenerateSessionId.php | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 regenerateSessionId.php (limited to 'regenerateSessionId.php') diff --git a/regenerateSessionId.php b/regenerateSessionId.php new file mode 100644 index 0000000..f0e4c4e --- /dev/null +++ b/regenerateSessionId.php @@ -0,0 +1,84 @@ +handler = new SessionHandler(); + } + + public function close() + { + return $this->handler->close(); + } + + public function destroy($session_id) + { + return $this->handler->destroy($session_id); + } + + public function gc($maxlifetime) + { + return $this->handler->gc($maxlifetime); + } + + public function open($save_path, $name) + { + return $this->handler->open($save_path, $name); + } + + public function read($session_id) + { + return $this->handler->read($session_id); + } + + public function write($session_id, $session_data) + { + return $this->handler->write($session_id, $session_data); + } + } +} + +if ($sessionProxy) { + $handler = new TestHandler(); + session_set_save_handler($handler); +} + +session_id($sessionId); +if (!session_start()) { + $result = "FAILED: session_start()"; +} +elseif (!session_regenerate_id($destroyPrevious)) { + $result = "FAILED: session_regenerate_id()"; +} +else { + $result = session_id(); +} +session_write_close(); +echo $result; + -- cgit