6.0.0-git
2019-03-18

[#11573] Horde-active-sessions does not work
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 2012-10-25 (2335 days ago)
Due
Updated 2013-06-21 (2096 days ago)
Assigned 2012-10-25 (2335 days ago)
Resolved 2013-06-21 (2096 days ago)
Milestone
Patch No

History
2013-06-21 18:03:21 Michael Slusarz Assigned to Michael Slusarz
State ⇒ Resolved
 
2013-06-21 18:02:44 Git Commit Comment #9 Reply to this comment
Changes have been made in Git (master):

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
2013-06-21 00:56:42 manuel (at) mausz (dot) at Comment #8 Reply to this comment
Hi Michael,

your fix is not complete. You've to restore the reference stored in 
Session::_data after destroying the session.

This should do the trick:
  if ($new_sess) {
    session_destroy();
+  $GLOBALS['session']->session_data = $old_sess;
  }
2013-04-23 22:01:51 Git Commit Comment #7 Reply to this comment
Changes have been made in Git (master):

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
2013-04-23 14:19:15 manuel (at) mausz (dot) at Comment #6 Reply to this comment
A fix is to use
$GLOBALS['session']->start();
instead of
session_start();
in Horde/Core/Factory/SessionHandler.php

And someone please reopen this ticket.
2013-04-23 13:35:49 manuel (at) mausz (dot) at Comment #5 Reply to this comment
I hope my comment will reopen the issue.

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)

2012-11-26 11:01:49 Jan Schneider State ⇒ No Feedback
 
2012-10-29 22:18:35 Michael Slusarz Comment #4 Reply to this comment
You will need to debug then.  I can't reproduce.
2012-10-29 06:44:20 tsipizic (at) ccf (dot) auth (dot) gr Comment #3 Reply to this comment
session.auto_start is disabled. I checked before filling the bug 
report. Thanks
Works perfectly fine here.  Sounds like you have session.auto_start 
on in PHP, which the installation documentation explicitly tells you 
to disable.
2012-10-25 23:29:48 Michael Slusarz Comment #2
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
Works perfectly fine here.  Sounds like you have session.auto_start on 
in PHP, which the installation documentation explicitly tells you to 
disable.
2012-10-25 08:09:28 tsipizic (at) ccf (dot) auth (dot) gr Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Horde-active-sessions does not work
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
I am using memcache as session handler and In admin interface I can 
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"]

Saved Queries