<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Session not cleaned up in alarms.php</title> 
  <pubDate>Sun, 05 Apr 2026 17:18:35 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8482</link> 
  <atom:link rel="self" type="application/rss+xml" title="Session not cleaned up in alarms.php" href="https://bugs.horde.org/ticket/8482/rss" /> 
  <description>Session not cleaned up in alarms.php</description> 
 
   
   
  <item> 
   <title>Perhaps I have my sessions mis-configured, but with current </title> 
   <description>Perhaps I have my sessions mis-configured, but with current alarms.php, I get sessions left around every time my alarms.php cron job runs.  The attached patch nukes the session when finished.</description> 
   <pubDate>Wed, 05 Aug 2009 17:12:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t55221</link> 
  </item> 
   
  <item> 
   <title>That looks like a nice addition. Why do you call clearAuth()</title> 
   <description>That looks like a nice addition. Why do you call clearAuth(), if the session is destroyed anyway?</description> 
   <pubDate>Thu, 06 Aug 2009 10:18:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t55239</link> 
  </item> 
   
  <item> 
   <title>&gt; That looks like a nice addition. Why do you call clearAuth</title> 
   <description>&gt; That looks like a nice addition. Why do you call clearAuth(), if the 

&gt; session is destroyed anyway?



Only because that&#039;s what login.php does for a logout.  I just copied what was done there.</description> 
   <pubDate>Wed, 12 Aug 2009 14:27:02 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t55274</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/framework/CLI/Attic/CLI.php?rt=horde&amp;r1=1.42.6.25&amp;r2=1.42.6.26&amp;ty=u</description> 
   <pubDate>Fri, 14 Aug 2009 22:00:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t55323</link> 
  </item> 
   
  <item> 
   <title>Instead I went ahead and added this as a shutdown method in </title> 
   <description>Instead I went ahead and added this as a shutdown method in the CLI constructor, so that the session is destroyed at the end of *any* CLI script.</description> 
   <pubDate>Fri, 14 Aug 2009 22:02:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t55324</link> 
  </item> 
   
  <item> 
   <title>&gt; Instead I went ahead and added this as a shutdown method i</title> 
   <description>&gt; Instead I went ahead and added this as a shutdown method in the CLI 

&gt; constructor, so that the session is destroyed at the end of *any* CLI 

&gt; script.



I tested that, and it seems to work for me.  I&#039;m glad you came up with a more comprehensive approach.

Thanks for fixing it.</description> 
   <pubDate>Mon, 17 Aug 2009 18:11:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t55332</link> 
  </item> 
   
  <item> 
   <title>Hmm... as pointed out somewhat by #8701, maybe a better solu</title> 
   <description>Hmm... as pointed out somewhat by #8701, maybe a better solution would be to avoid opening a session from the CLI in the first place?</description> 
   <pubDate>Thu, 12 Nov 2009 04:02:47 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56681</link> 
  </item> 
   
  <item> 
   <title>The session is not started in CLI, and there&#039;s no guarantee </title> 
   <description>The session is not started in CLI, and there&#039;s no guarantee that it will be loaded before base.php. Beside that, it wouldn&#039;t help with bug 8482, because backend.php wouldn&#039;t even work without a session.</description> 
   <pubDate>Thu, 12 Nov 2009 07:50:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56683</link> 
  </item> 
   
  <item> 
   <title>&gt; The session is not started in CLI, 

Maybe for the CLI s</title> 
   <description>&gt; The session is not started in CLI, 

Maybe for the CLI scripts that do require a session, then the script itself should be responsible for destroying it.  At a minimum, we should allow passing an option to CLI to indicate we don&#039;t want to kill any active sessions.


</description> 
   <pubDate>Thu, 12 Nov 2009 14:55:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56696</link> 
  </item> 
   
  <item> 
   <title>What actually requires a functional session when running fro</title> 
   <description>What actually requires a functional session when running from the CLI? I was thinking that we should just not call session_start() if php_sapi_name() == &#039;cli&#039;.</description> 
   <pubDate>Thu, 12 Nov 2009 15:02:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56697</link> 
  </item> 
   
  <item> 
   <title>&gt; What actually requires a functional session when running f</title> 
   <description>&gt; What actually requires a functional session when running from the 
&gt; CLI?

Doesn&#039;t Auth use $_SESSION? So any script that needs an actual user name to be set in auth would require a session, right?
</description> 
   <pubDate>Thu, 12 Nov 2009 15:21:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56698</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; What actually requires a functional session when running </title> 
   <description>&gt;&gt; What actually requires a functional session when running from the
&gt;&gt; CLI?
&gt;
&gt; Doesn&#039;t Auth use $_SESSION? So any script that needs an actual user 
&gt; name to be set in auth would require a session, right?

Yes, and the superglobal is only created when a session is started.
</description> 
   <pubDate>Thu, 12 Nov 2009 15:31:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56699</link> 
  </item> 
   
  <item> 
   <title>What about only registering the shutdown function if we are </title> 
   <description>What about only registering the shutdown function if we are running from the cli? i.e.:
 
-        register_shutdown_function(array($this, &#039;_shutdown&#039;));
+        if ($this-&gt;_console) {
+            register_shutdown_function(array($this, &#039;_shutdown&#039;));
+        }
     }
</description> 
   <pubDate>Fri, 13 Nov 2009 01:51:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56707</link> 
  </item> 
   
  <item> 
   <title>That looks reasonable to me...</title> 
   <description>That looks reasonable to me...</description> 
   <pubDate>Fri, 13 Nov 2009 05:00:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56709</link> 
  </item> 
   
  <item> 
   <title>Good idea.</title> 
   <description>Good idea.</description> 
   <pubDate>Fri, 13 Nov 2009 08:42:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56711</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Only destroy</title> 
   <description>Changes have been made in CVS for this ticket:

Only destroy the session if we are actually running via the cli.
Also fixes Bug: 8701
Bug: 8482
http://cvs.horde.org/diff.php/framework/CLI/Attic/CLI.php?rt=horde&amp;r1=1.42.6.27&amp;r2=1.42.6.28&amp;ty=u</description> 
   <pubDate>Fri, 13 Nov 2009 14:28:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56717</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Only destroy</title> 
   <description>Changes have been made in Git for this ticket:

Only destroy the session if we are actually running via the cli. Bug: 8482 and also resolves Bug: 8701

http://git.horde.org/diff.php/framework/Cli/lib/Horde/Cli.php?rt=horde-git&amp;r1=4c1ef7437017c2c9aee53eecb0dc3dea03ab3b97&amp;r2=778778570869506ccec9470e15ba9f79c06912d0</description> 
   <pubDate>Fri, 13 Nov 2009 14:31:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8482#t56719</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
