Summary | Horde-active-sessions does not work |
Queue | Horde Base |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | tsipizic (at) ccf (dot) auth (dot) gr |
Created | 10/25/2012 (4651 days ago) |
Due | |
Updated | 06/21/2013 (4412 days ago) |
Assigned | 10/25/2012 (4651 days ago) |
Resolved | 06/21/2013 (4412 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
commit b757bc902f25e1338c6355eeda096548f1b1b03c
Author: Michael M Slusarz <slusarz@horde.org>
Date: Fri Jun 21 11:35:55 2013 -0600
Restore old session data if we had to create a new session
Bug #11573.../Core/lib/Horde/Core/Factory/SessionHandler.php | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/b757bc902f25e1338c6355eeda096548f1b1b03c
your fix is not complete. You've to restore the reference stored in
Session::_data after destroying the session.
This should do the trick:
session_destroy();
+ $GLOBALS['session']->session_data = $old_sess;
}
commit 62843c0e3d9aabf827c7b16355ec3f05bc19a8fa
Author: Michael M Slusarz <slusarz@horde.org>
Date: Tue Apr 23 15:56:42 2013 -0600
Fix session data access when calling from command line (
Bug #11573).../Core/lib/Horde/Core/Factory/SessionHandler.php | 5 +++--
framework/Core/lib/Horde/Session.php | 13 +++++++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/62843c0e3d9aabf827c7b16355ec3f05bc19a8fa
$GLOBALS['session']->start();
instead of
session_start();
in Horde/Core/Factory/SessionHandler.php
And someone please reopen this ticket.
I've tried to debug this and I think this never worked (at least with
PHP 5.4):
* cli access creates the horde session with setup(start=false, ...).
Thus session_start() will never be called, so there's no session and
the $GLOBALS['session']->_data property is just a reference to a
"normal" array.
* as there's no valid session, Horde/Core/Factory/SessionHandler.php
will call session_start() (in the stub branch) which in turn will
convert the reference into a normal array (I've no idea what php is
doing here in it's internals). But I guess this is the reason for the
additional assignment of $this->_data = &$_SESSION after calling
session_start() in Horde_Session::_start(...).
* since the connection between $_SESSION and
$GLOBALS['session']->_data is lost, all calls of
$GLOBALS['session']->get(...) will be non sense and the function will
return false
* this is working in hordes frontend because the other branch will be
used ($new_sess = false)
report. Thanks
on in PHP, which the installation documentation explicitly tells you
to disable.
State ⇒ Feedback
Priority ⇒ 1. Low
in PHP, which the installation documentation explicitly tells you to
disable.
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Horde Base
Summary ⇒ Horde-active-sessions does not work
Type ⇒ Bug
Priority ⇒ 2. Medium
see the Current sessions in admin/sessions.php . Although when trying
to use the horde-active-sessions script from cli it produces the
following error.
HORDE: [horde] PHP ERROR: ini_set(): A session is active. You cannot
change the session module's ini settings at this time [pid 8335 on
line 97 of "/usr/share/php/Horde/SessionHandler.php"]