phpCAS: session_set_save_handler(): Cannot change save handler when session is active
public function __construct(
...
\SessionHandlerInterface $sessionHandler = null
) {
...
if (empty($sessionHandler)) {
$sessionHandler = new CAS_Session_PhpSession;
}
...
$this->setSessionHandler($sessionHandler);
this calls session_set_save_handler and that won’t work if the session is allready startet. Simple workaround would be:
public function __construct(
...
\SessionHandlerInterface $sessionHandler = null
) {
...
if (!empty($sessionHandler)) {
$this->setSessionHandler($sessionHandler);
}
...
Greetings Frank
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 21 (9 by maintainers)
Commits related to this issue
- Fix session_set_save_handler error #365 introduced with #340 — committed to apereo/phpCAS by jfritschi 3 years ago
I have added a fix. Can you please verify if it works for your use cases?
Yes, definitely. I have already tagged this issue as part of the 1.3.10 release… I will probably release 1.3.10 before the end of February. There are some other things that need to be fixed before cutting a new release.