<?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>Horde_Core-2.13.1 breaks SQL database access</title> 
  <pubDate>Thu, 09 Apr 2026 21:18:33 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/13463</link> 
  <atom:link rel="self" type="application/rss+xml" title="Horde_Core-2.13.1 breaks SQL database access" href="https://bugs.horde.org/ticket/13463/rss" /> 
  <description>Horde_Core-2.13.1 breaks SQL database access</description> 
 
   
   
  <item> 
   <title>After upgrading to Horde_Core-2.13.1, every attempt to displ</title> 
   <description>After upgrading to Horde_Core-2.13.1, every attempt to display an e-mail or agenda event fails and results in the following error message being logged:

[22-Aug-2014 08:47:14] WARNING: [pool www] child 16880 said into stderr: &quot;NOTICE: PHP message: PHP Fatal error:  Call to a member function commit() on a non-object in /usr/share/php5/PEAR/Horde/Db/Adapter/Pdo/Base.php on line 268&quot;

Downgrading to Horde_Core-2.13.0 immediately fixes things. I&#039;m using SQL for pretty much everything, except for the Horde_Cache (which uses the filesystem).</description> 
   <pubDate>Fri, 22 Aug 2014 06:58:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85339</link> 
  </item> 
   
  <item> 
   <title>I don&#039;t see any issues, and have a similar setup. Is this wi</title> 
   <description>I don&#039;t see any issues, and have a similar setup. Is this with any action or only those two? And please provide a backtrace.</description> 
   <pubDate>Fri, 22 Aug 2014 10:25:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85352</link> 
  </item> 
   
  <item> 
   <title>&gt; I don&#039;t see any issues, and have a similar setup. Is this </title> 
   <description>&gt; I don&#039;t see any issues, and have a similar setup. Is this with any 
&gt; action or only those two? And please provide a backtrace.

The latter probably means placing &#039;Horde::debug&#039; somewhere strategically around line 268 in /usr/share/php5/PEAR/Horde/Db/Adapter/Pdo/Base.php?

Having said that, I probably already found the culprit. I use the &#039;SQL&#039; session handler. When I switch to &#039;Filesystem storage&#039;, there is no problem. Switching back to &#039;SQL&#039; and the problem is back.

</description> 
   <pubDate>Fri, 22 Aug 2014 15:35:07 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85360</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; I don&#039;t see any issues, and have a similar setup. Is this</title> 
   <description>&gt;&gt; I don&#039;t see any issues, and have a similar setup. Is this with any
&gt;&gt; action or only those two? And please provide a backtrace.
&gt;
&gt; The latter probably means placing &#039;Horde::debug&#039; somewhere 
&gt; strategically around line 268 in 
&gt; /usr/share/php5/PEAR/Horde/Db/Adapter/Pdo/Base.php?

Setting the log level to DEBUG is sufficient.

&gt; Having said that, I probably already found the culprit. I use the 
&gt; &#039;SQL&#039; session handler. When I switch to &#039;Filesystem storage&#039;, there 
&gt; is no problem. Switching back to &#039;SQL&#039; and the problem is back.

Confirmed, though I only see this in Kronolith&#039;s Ajax requests.</description> 
   <pubDate>Fri, 22 Aug 2014 16:55:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85362</link> 
  </item> 
   
  <item> 
   <title>Could be some shutdown order race condition:

[Fri Aug 22 </title> 
   <description>Could be some shutdown order race condition:

[Fri Aug 22 18:55:33.865966 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP Fatal error:  Call to a member function commit() on a non-object in /home/jan/horde-develop/framework/Db/lib/Horde/Db/Adapter/Pdo/Base.php on line 268, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866062 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP Stack trace:, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866091 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP   1. {main}() /home/jan/horde-develop/horde/services/ajax.php:0, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866126 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP   2. Horde_Core_Ajax_Application-&gt;send() /home/jan/horde-develop/horde/services/ajax.php:70, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866160 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP   3. Horde_Core_Ajax_Response-&gt;sendAndExit() /home/jan/horde-develop/framework/Core/lib/Horde/Core/Ajax/Application.php:241, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866193 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP   4. Horde_SessionHandler-&gt;__destruct() /home/jan/horde-develop/framework/SessionHandler/lib/Horde/SessionHandler.php:0, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866260 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP   5. session_write_close() /home/jan/horde-develop/framework/SessionHandler/lib/Horde/SessionHandler.php:115, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866293 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP   6. Horde_SessionHandler-&gt;close() /home/jan/horde-develop/framework/SessionHandler/lib/Horde/SessionHandler.php:115, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866325 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP   7. Horde_SessionHandler_Storage_Sql-&gt;close() /home/jan/horde-develop/framework/SessionHandler/lib/Horde/SessionHandler.php:150, referer: http://neo.wg.de/headhorde/kronolith/
[Fri Aug 22 18:55:33.866358 2014] [:error] [pid 5172] [client 192.168.60.176:57606] PHP   8. Horde_Db_Adapter_Pdo_Base-&gt;commitDbTransaction() /home/jan/horde-develop/framework/SessionHandler/lib/Horde/SessionHandler/Storage/Sql.php:77, referer: http://neo.wg.de/headhorde/kronolith/
</description> 
   <pubDate>Fri, 22 Aug 2014 16:57:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85363</link> 
  </item> 
   
  <item> 
   <title>I made some changes in the DB factory that fixed an issue wi</title> 
   <description>I made some changes in the DB factory that fixed an issue with infinite looping if SQL was being used as a cache driver.  But I don&#039;t see anything wrong with that code that would cause this issue directly.</description> 
   <pubDate>Sun, 24 Aug 2014 23:36:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85410</link> 
  </item> 
   
  <item> 
   <title>Is there anything else I can/need to do to resolve this? Do </title> 
   <description>Is there anything else I can/need to do to resolve this? Do I need to post another backtrace like Jan already did? I see this happening with the SQL sessionhandler.</description> 
   <pubDate>Mon, 25 Aug 2014 09:13:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85420</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Having said that, I probably already found the culprit. I</title> 
   <description>&gt;&gt; Having said that, I probably already found the culprit. I use the
&gt;&gt; &#039;SQL&#039; session handler. When I switch to &#039;Filesystem storage&#039;, there
&gt;&gt; is no problem. Switching back to &#039;SQL&#039; and the problem is back.
&gt;
&gt; Confirmed, though I only see this in Kronolith&#039;s Ajax requests.

This could be due to the fact that I&#039;m using SQL for IMAP caching, which might trigger similar behavior as the SQL sessionhandler.</description> 
   <pubDate>Mon, 25 Aug 2014 09:16:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85421</link> 
  </item> 
   
  <item> 
   <title>&gt; Is there anything else I can/need to do to resolve this? D</title> 
   <description>&gt; Is there anything else I can/need to do to resolve this? Do I need to 
&gt; post another backtrace like Jan already did? I see this happening 
&gt; with the SQL sessionhandler.

I have no idea, but I&#039;m not really the SQL guy.

I would tend to agree with Jan - this was a preexisting bug that just recently manifested itself because of the way things are setup/torn down.  Changing factories triggered the bug, but didn&#039;t cause it.

From the SQL driver:

        /* Close any open transactions. */
        if ($this-&gt;_db-&gt;transactionStarted()) {
            try {
                $this-&gt;_db-&gt;commitDbTransaction();
            } catch (Horde_Db_Exception $e) {
                return false;
            }
        }

Seems like a issue in the DB adapter.  Because if $this-&gt;_db-&gt;transactionStarted() is true, that assumes that there is an active connection.
</description> 
   <pubDate>Mon, 25 Aug 2014 19:04:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85469</link> 
  </item> 
   
  <item> 
   <title>I don&#039;t know if this may help.

In previous version 5.2.0 </title> 
   <description>I don&#039;t know if this may help.

In previous version 5.2.0 If got the same error but in that moment the problem was caused by a problem accessing the horde log file (Was changed to file instead syslog and after upgrade the apache user did not have write access to the file).

Solving the problem the SQL error stopped. Strange?</description> 
   <pubDate>Thu, 28 Aug 2014 07:13:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85521</link> 
  </item> 
   
  <item> 
   <title>I&#039;ve been debugging the problem and determined that the prob</title> 
   <description>I&#039;ve been debugging the problem and determined that the problem is in the changes changes in the file Horde/Core/Factory/Db.php

If I revert only this file to the one of the previous version of Horde_Core all seems to work fine again.

Looking at the changes I think I&#039;ve found that the problem is caused doing the call to $ob-&gt;setCache after $ob-&gt;setLogger 

I&#039;ve changed the code to look more like the old version and calling $ob-&gt;setCache prior to $ob-&gt;setLogger and works fine

If you need the changed code let me know</description> 
   <pubDate>Fri, 29 Aug 2014 10:27:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85541</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit 0688cd531929</title> 
   <description>Changes have been made in Git (master):

commit 0688cd531929ffab5a0f44dd2a6e3f7efd7c2abb
Author: Michael M Slusarz &lt;slusarz@horde.org&gt;
Date:   Mon Sep 1 13:54:18 2014 -0600

    Bug #13463: Possible fix

 framework/Core/lib/Horde/Core/Factory/Db.php |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

http://github.com/horde/horde/commit/0688cd531929ffab5a0f44dd2a6e3f7efd7c2abb</description> 
   <pubDate>Mon, 01 Sep 2014 19:54:53 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85576</link> 
  </item> 
   
  <item> 
   <title>Does this patch fix?

I don&#039;t have time right now to track</title> 
   <description>Does this patch fix?

I don&#039;t have time right now to track down why this fixes so this is not fixing the underlying problem - only the initiation of the problem.</description> 
   <pubDate>Mon, 01 Sep 2014 19:56:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85577</link> 
  </item> 
   
  <item> 
   <title>&gt; Does this patch fix?

Yes. I replaced the version from P</title> 
   <description>&gt; Does this patch fix?

Yes. I replaced the version from PEAR of Horde/Core/Factory/Db.php by the one from Git (there are more changes in it than just this) and after that, the SQL session handler can be used again.</description> 
   <pubDate>Tue, 02 Sep 2014 05:50:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85583</link> 
  </item> 
   
  <item> 
   <title>Sorry, doesn&#039;t  work for me, I&#039;ve replace the Db.php file an</title> 
   <description>Sorry, doesn&#039;t  work for me, I&#039;ve replace the Db.php file and got the same error.

The attached file dows work but this is only a test and don&#039;t know if is a valid solution for the other bug.</description> 
   <pubDate>Tue, 02 Sep 2014 14:41:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85591</link> 
  </item> 
   
  <item> 
   <title>&gt; Sorry, doesn&#039;t  work for me, I&#039;ve replace the Db.php file </title> 
   <description>&gt; Sorry, doesn&#039;t  work for me, I&#039;ve replace the Db.php file and got the 
&gt; same error.

If that is true, then this is some kind of very obscure bug that involves execution order.  (Do you use a split read/write setup?  Do you use DB for logging?)</description> 
   <pubDate>Wed, 03 Sep 2014 08:25:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85596</link> 
  </item> 
   
  <item> 
   <title>Yes I have split read/write since we have two servers qith t</title> 
   <description>Yes I have split read/write since we have two servers qith the same URL
I use SQL SessionHandler
and no I don´t have SQL Logging, now I&#039;m using SYSLOG

Regards</description> 
   <pubDate>Wed, 03 Sep 2014 08:58:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85597</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit 664063d11ea9</title> 
   <description>Changes have been made in Git (master):

commit 664063d11ea9d30bd9e9f66d13203bb4a521b7ce
Author: Michael M Slusarz &lt;slusarz@horde.org&gt;
Date:   Wed Sep 3 17:28:12 2014 -0600

    Don&#039;t attach logger to base split read object
    
    Bug #13463

 framework/Core/lib/Horde/Core/Factory/Db.php |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

http://github.com/horde/horde/commit/664063d11ea9d30bd9e9f66d13203bb4a521b7ce</description> 
   <pubDate>Wed, 03 Sep 2014 23:28:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85606</link> 
  </item> 
   
  <item> 
   <title>Maybe this helps.

FWIW - from a performance perspective, </title> 
   <description>Maybe this helps.

FWIW - from a performance perspective, nobody should be using SQL as a session handler.</description> 
   <pubDate>Wed, 03 Sep 2014 23:29:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85607</link> 
  </item> 
   
  <item> 
   <title>No, sorry. With de new Db.php the error is the same.

I th</title> 
   <description>No, sorry. With de new Db.php the error is the same.

I think that the problem is caused by calling setLogger without a prior SetCache when you pass $cache as false. 

Without knowing if this is not the intended behaviour or if this my break some other thing with this change:

        if ($cache &amp;&amp; !isset($config[&#039;logger&#039;])) {
            $ob-&gt;setLogger($this-&gt;_injector-&gt;getInstance(&#039;Horde_Log_Logger&#039;));
        }

the error goes away, 

I know that in this situation the logger instance is not atached to the individual read and write db objects

I know that the performance is worse with SQL Session Handler but we have Horde installed in two diffent systems and if we use Standard PHP Session files we have locking problems, and we haven&#039;t been able of getting the &quot;Distribute Cache Table&quot; option to work</description> 
   <pubDate>Thu, 04 Sep 2014 09:27:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85611</link> 
  </item> 
   
  <item> 
   <title>&gt; I know that the performance is worse with SQL Session Hand</title> 
   <description>&gt; I know that the performance is worse with SQL Session Handler but we 
&gt; have Horde installed in two diffent systems and if we use Standard 
&gt; PHP Session files we have locking problems, and we haven&#039;t been able 
&gt; of getting the &quot;Distribute Cache Table&quot; option to work.

If you manage to setup a Distributed Hashtable and use it for session storage, you&#039;ll probably find that in some cases it will perform worse than the SQL sessionhandler. If you update the calender view in Kronolith for instance, in Firefox up to six listEvent processes will run concurrently. But since they will all try to lock the session at the same time and have identical backoff intervals, it will require at least 500 ms before they finish. The SQL sessionhandler will run these processes in parallel, without having to wait for a lock. In my system, the SQL session handler is noticeably faster.

See also http://bugs.horde.org/ticket/13231</description> 
   <pubDate>Fri, 05 Sep 2014 11:08:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85622</link> 
  </item> 
   
  <item> 
   <title>&gt; If you manage to setup a Distributed Hashtable and use it </title> 
   <description>&gt; If you manage to setup a Distributed Hashtable and use it for session 
&gt; storage, you&#039;ll probably find that in some cases it will perform 
&gt; worse than the SQL sessionhandler. If you update the calender view in 
&gt; Kronolith for instance, in Firefox up to six listEvent processes will 
&gt; run concurrently. But since they will all try to lock the session at 
&gt; the same time and have identical backoff intervals, it will require 
&gt; at least 500 ms before they finish. The SQL sessionhandler will run 
&gt; these processes in parallel, without having to wait for a lock. In my 
&gt; system, the SQL session handler is noticeably faster.

OK, tanks for de advise, we are reasonably satisfied with de SQL Session Handler, even if the native PHP Session Handler was faster for an independent system
</description> 
   <pubDate>Fri, 05 Sep 2014 11:36:11 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t85623</link> 
  </item> 
   
  <item> 
   <title>Marking as resolved as nobody has complained since the commi</title> 
   <description>Marking as resolved as nobody has complained since the commit was added.</description> 
   <pubDate>Thu, 08 Jan 2015 03:24:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t87063</link> 
  </item> 
   
  <item> 
   <title>Hello, the problem still exists, as you can see in my commen</title> 
   <description>Hello, the problem still exists, as you can see in my comment #20 I continue having problems after the commit.</description> 
   <pubDate>Thu, 08 Jan 2015 15:58:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13463#t87077</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
