<?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>Invalid db resources after rewrite</title> 
  <pubDate>Fri, 10 Apr 2026 17:02:24 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9027</link> 
  <atom:link rel="self" type="application/rss+xml" title="Invalid db resources after rewrite" href="https://bugs.horde.org/ticket/9027/rss" /> 
  <description>Invalid db resources after rewrite</description> 
 
   
   
  <item> 
   <title>Since the recent DB rewrite including Horde_Core_Binder_Comm</title> 
   <description>Since the recent DB rewrite including Horde_Core_Binder_Common, I get some problems with invalid db link resources. This happens for example when creating new calendars through the ajax interface, when the alarm&#039;s listAlarms() is triggered. Here&#039;s a full backtrace:

DB Error: no database selected

[Zeile 104 von /home/jan/sapo/horde/framework/Alarm/lib/Horde/Alarm/Sql.php]
Details:
The full error message is logged in Horde&#039;s log file, and is shown below only to administrators. Non-administrative users will not see error details.

Horde_Alarm_Exception Object
(
    [message:protected] =&gt; DB Error: no database selected
    [string:Exception:private] =&gt; 
    [code:protected] =&gt; -14
    [file:protected] =&gt; /home/jan/sapo/horde/framework/Alarm/lib/Horde/Alarm/Sql.php
    [line:protected] =&gt; 104
    [trace:Exception:private] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/framework/Alarm/lib/Horde/Alarm.php
                    [line] =&gt; 180
                    [function] =&gt; _list
                    [class] =&gt; Horde_Alarm_Sql
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; jan
                            [1] =&gt; Horde_Date Object
                                (
                                    [_year:protected] =&gt; 2010
                                    [_month:protected] =&gt; 5
                                    [_mday:protected] =&gt; 14
                                    [_hour:protected] =&gt; 17
                                    [_min:protected] =&gt; 53
                                    [_sec:protected] =&gt; 17
                                    [_timezone:protected] =&gt; UTC
                                    [_defaultFormat:protected] =&gt; Y-m-d H:i:s
                                    [_formatCache:protected] =&gt; Array
                                        (
                                            [Y-m-d\TH:i:s] =&gt; 2010-05-14T17:53:17
                                        )

                                )

                        )

                )

            [1] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/framework/Alarm/lib/Horde/Alarm.php
                    [line] =&gt; 457
                    [function] =&gt; listAlarms
                    [class] =&gt; Horde_Alarm
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; jan
                            [1] =&gt; 
                            [2] =&gt; 1
                            [3] =&gt; 1
                        )

                )

            [2] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/framework/Notification/lib/Horde/Notification/Handler/Decorator/Alarm.php
                    [line] =&gt; 54
                    [function] =&gt; notify
                    [class] =&gt; Horde_Alarm
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; jan
                        )

                )

            [3] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/framework/Notification/lib/Horde/Notification/Handler.php
                    [line] =&gt; 284
                    [function] =&gt; notify
                    [class] =&gt; Horde_Notification_Handler_Decorator_Alarm
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; Array
                                (
                                    [listeners] =&gt; Array
                                        (
                                            [0] =&gt; status
                                        )

                                    [raw] =&gt; 1
                                )

                        )

                )

            [4] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/framework/Core/lib/Horde.php
                    [line] =&gt; 510
                    [function] =&gt; notify
                    [class] =&gt; Horde_Notification_Handler
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; Array
                                (
                                    [listeners] =&gt; status
                                    [raw] =&gt; 1
                                )

                        )

                )

            [5] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/horde/services/ajax.php
                    [line] =&gt; 68
                    [function] =&gt; prepareResponse
                    [class] =&gt; Horde
                    [type] =&gt; ::
                    [args] =&gt; Array
                        (
                            [0] =&gt; stdClass Object
                                (
                                    [perms] =&gt; Array
                                        (
                                            [users] =&gt; Array
                                                (
                                                )

                                            [type] =&gt; matrix
                                            [default] =&gt; 0
                                            [guest] =&gt; 0
                                            [creator] =&gt; 0
                                            [groups] =&gt; Array
                                                (
                                                )

                                        )

                                    [calendar] =&gt; 6d8e0e1e4810603bfa69b50e2740e48c
                                    [saved] =&gt; 1
                                    [color] =&gt; #000
                                )

                            [1] =&gt; 1
                        )

                )

        )

    [previous:Exception:private] =&gt; 
    [xdebug_message] =&gt; &lt;tr&gt;&lt;th align=&#039;left&#039; bgcolor=&#039;#f57900&#039; colspan=&quot;5&quot;&gt;&lt;span style=&#039;background-color: #cc0000; color: #fce94f; font-size: x-large;&#039;&gt;( ! )&lt;/span&gt; Horde_Alarm_Exception: DB Error: no database selected in /home/jan/sapo/horde/framework/Alarm/lib/Horde/Alarm/Sql.php on line &lt;i&gt;104&lt;/i&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&#039;left&#039; bgcolor=&#039;#e9b96e&#039; colspan=&#039;5&#039;&gt;Call Stack&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&#039;center&#039; bgcolor=&#039;#eeeeec&#039;&gt;#&lt;/th&gt;&lt;th align=&#039;left&#039; bgcolor=&#039;#eeeeec&#039;&gt;Time&lt;/th&gt;&lt;th align=&#039;left&#039; bgcolor=&#039;#eeeeec&#039;&gt;Memory&lt;/th&gt;&lt;th align=&#039;left&#039; bgcolor=&#039;#eeeeec&#039;&gt;Function&lt;/th&gt;&lt;th align=&#039;left&#039; bgcolor=&#039;#eeeeec&#039;&gt;Location&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;1&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;0,0004&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;right&#039;&gt;350316&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039;&gt;{main}(  )&lt;/td&gt;&lt;td title=&#039;/home/jan/sapo/horde/horde/services/ajax.php&#039; bgcolor=&#039;#eeeeec&#039;&gt;../ajax.php&lt;b&gt;:&lt;/b&gt;0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;2&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;0,3945&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;right&#039;&gt;14406472&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039;&gt;Horde::prepareResponse(  )&lt;/td&gt;&lt;td title=&#039;/home/jan/sapo/horde/horde/services/ajax.php&#039; bgcolor=&#039;#eeeeec&#039;&gt;../ajax.php&lt;b&gt;:&lt;/b&gt;68&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;3&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;0,3945&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;right&#039;&gt;14406952&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039;&gt;Horde_Notification_Handler-&gt;notify(  )&lt;/td&gt;&lt;td title=&#039;/home/jan/sapo/horde/framework/Core/lib/Horde.php&#039; bgcolor=&#039;#eeeeec&#039;&gt;../Horde.php&lt;b&gt;:&lt;/b&gt;510&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;4&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;0,3946&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;right&#039;&gt;14407332&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039;&gt;Horde_Notification_Handler_Decorator_Alarm-&gt;notify(  )&lt;/td&gt;&lt;td title=&#039;/home/jan/sapo/horde/framework/Notification/lib/Horde/Notification/Handler.php&#039; bgcolor=&#039;#eeeeec&#039;&gt;../Handler.php&lt;b&gt;:&lt;/b&gt;284&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;5&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;center&#039;&gt;0,3946&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039; align=&#039;right&#039;&gt;14407332&lt;/td&gt;&lt;td bgcolor=&#039;#eeeeec&#039;&gt;Horde_Alarm-&gt;notify(  )&lt;/td&gt;&lt;td title=&#039;/home/jan/sapo/horde/framework/Notification/lib/Horde/Notification/Handler/Decorator/Alarm.php&#039; bgcolor=&#039;#eeeeec&#039;&gt;../Alarm.php&lt;b&gt;:&lt;/b&gt;54&lt;/td&gt;&lt;/tr&gt;

)
</description> 
   <pubDate>Fri, 14 May 2010 17:57:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58830</link> 
  </item> 
   
  <item> 
   <title>The error message is misleading, because the real error is:</title> 
   <description>The error message is misleading, because the real error is:
Warning: mysql_select_db(): 90 is not a valid MySQL-Link resource in /usr/local/apache/php/lib/php/DB/mysql.php on line 307</description> 
   <pubDate>Fri, 14 May 2010 17:57:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58831</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9027: U</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9027: Use Horde_Db_Pear binder to get DB objects

 delete mode 100644 framework/Core/lib/Horde/Core/Binder/Common.php
 create mode 100644 framework/Core/lib/Horde/Core/Binder/DbPear.php
 create mode 100644 framework/Core/lib/Horde/Core/Factory/DbPear.php
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Alarm.php?rt=horde-git&amp;r1=9aab052c54d35a272e7c2799042243990ef60fbb&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Cache.php?rt=horde-git&amp;r1=40e6e5beecbd4b69b590afaecbde1adf662ea3dc&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Common.php?rt=horde-git&amp;r1=ff69ab061e00228d254232bc0049828415bfebef&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/co.php/framework/Core/lib/Horde/Core/Binder/DbPear.php?rt=horde-git&amp;r=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Lock.php?rt=horde-git&amp;r1=9aab052c54d35a272e7c2799042243990ef60fbb&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Perms.php?rt=horde-git&amp;r1=9aab052c54d35a272e7c2799042243990ef60fbb&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/SessionHandler.php?rt=horde-git&amp;r1=9aab052c54d35a272e7c2799042243990ef60fbb&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Token.php?rt=horde-git&amp;r1=9aab052c54d35a272e7c2799042243990ef60fbb&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/co.php/framework/Core/lib/Horde/Core/Factory/DbPear.php?rt=horde-git&amp;r=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/diff.php/framework/Core/lib/Horde/Registry.php?rt=horde-git&amp;r1=fd6f247c888a218953c7c19fe6cfe0d15aa69540&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03
http://git.horde.org/diff.php/framework/Core/package.xml?rt=horde-git&amp;r1=9aab052c54d35a272e7c2799042243990ef60fbb&amp;r2=c185c64bc1d178d54ef2c22de3d7a806677f5b03</description> 
   <pubDate>Fri, 14 May 2010 19:02:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58832</link> 
  </item> 
   
  <item> 
   <title>Any chance this fixes things?</title> 
   <description>Any chance this fixes things?</description> 
   <pubDate>Fri, 14 May 2010 19:03:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58833</link> 
  </item> 
   
  <item> 
   <title>Unfortunately not.</title> 
   <description>Unfortunately not.</description> 
   <pubDate>Fri, 14 May 2010 21:48:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58835</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Use Horde_Db</title> 
   <description>Changes have been made in Git for this ticket:

Use Horde_Db
Bug #9027: Possible fix to Horde_Alarm SQL issue

http://git.horde.org/diff.php/framework/Alarm/lib/Horde/Alarm/Sql.php?rt=horde-git&amp;r1=b4ba6ed538947767af0304941d7c9fc93caad90d&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Alarm/package.xml?rt=horde-git&amp;r1=a348a83b40a5653c565640fce45976a7c8d41cac&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Cache/lib/Horde/Cache/Sql.php?rt=horde-git&amp;r1=b4ba6ed538947767af0304941d7c9fc93caad90d&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Cache/package.xml?rt=horde-git&amp;r1=40e6e5beecbd4b69b590afaecbde1adf662ea3dc&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Alarm.php?rt=horde-git&amp;r1=c185c64bc1d178d54ef2c22de3d7a806677f5b03&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Cache.php?rt=horde-git&amp;r1=c185c64bc1d178d54ef2c22de3d7a806677f5b03&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Lock.php?rt=horde-git&amp;r1=c185c64bc1d178d54ef2c22de3d7a806677f5b03&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Perms.php?rt=horde-git&amp;r1=c185c64bc1d178d54ef2c22de3d7a806677f5b03&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Core/lib/Horde/Core/Binder/Token.php?rt=horde-git&amp;r1=c185c64bc1d178d54ef2c22de3d7a806677f5b03&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Db/lib/Horde/Db/Adapter/Base.php?rt=horde-git&amp;r1=5d6be5721093385fbe36f81ab7b6053ad0a5a042&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Db/lib/Horde/Db/Adapter/Pdo/Oci.php?rt=horde-git&amp;r1=1a310b2de34193b3f984e4506d87b32de412a65e&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Lock/lib/Horde/Lock/Sql.php?rt=horde-git&amp;r1=b4ba6ed538947767af0304941d7c9fc93caad90d&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Lock/package.xml?rt=horde-git&amp;r1=7994594b3db35ca7478d608131d8faa214900fb5&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Perms/lib/Horde/Perms/Permission/SqlObject.php?rt=horde-git&amp;r1=6f08cdbb1653c8c573e823589f7d83652e8cc739&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Perms/lib/Horde/Perms/Sql.php?rt=horde-git&amp;r1=b4ba6ed538947767af0304941d7c9fc93caad90d&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Token/lib/Horde/Token/Sql.php?rt=horde-git&amp;r1=4e98bb8db00f25a81403f912c2ca515c85a3c598&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/framework/Token/package.xml?rt=horde-git&amp;r1=69d631396c9c6560805bd0aadf8f775797a45f2d&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/imp/lib/Injector/Binder/Sentmail.php?rt=horde-git&amp;r1=f92994a77d09b7d2badebcf5d55404a74820b7ca&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869
http://git.horde.org/diff.php/imp/lib/Sentmail/Sql.php?rt=horde-git&amp;r1=8763512795317061d4cef961637aeb2df6bcd6f4&amp;r2=c5a17f712a86e81377a1f81a28c3d2c38597d869</description> 
   <pubDate>Tue, 18 May 2010 17:17:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58873</link> 
  </item> 
   
  <item> 
   <title>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Use H</title> 
   <description>&gt; Changes have been made in Git for this ticket:
&gt;
&gt; Use Horde_Db
&gt; Bug #9027: Possible fix to Horde_Alarm SQL issue

Avoiding PEAR DB debugging by simply converting to Horde_Db.  Maybe this will work?</description> 
   <pubDate>Tue, 18 May 2010 17:29:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58880</link> 
  </item> 
   
  <item> 
   <title>There&#039;s progress, the error comes from a different place now</title> 
   <description>There&#039;s progress, the error comes from a different place now, and is no longer fatal :)
I can create the calendars just fine now, but in the logs I see:

2010-05-19T14:22:52+02:00 ERR: HEADHORDE [kronolith] Failed checking prefs for jan: DB Error: no database selected [pid 30003 on line 191 of &quot;/home/jan/horde-git/framework/Prefs/lib/Horde/Prefs/Sql.php&quot;]</description> 
   <pubDate>Wed, 19 May 2010 12:25:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58898</link> 
  </item> 
   
  <item> 
   <title>&gt; There&#039;s progress, the error comes from a different place n</title> 
   <description>&gt; There&#039;s progress, the error comes from a different place now, and is 
&gt; no longer fatal :)
&gt; I can create the calendars just fine now, but in the logs I see:
&gt;
&gt; 2010-05-19T14:22:52+02:00 ERR: HEADHORDE [kronolith] Failed checking 
&gt; prefs for jan: DB Error: no database selected [pid 30003 on line 191 
&gt; of &quot;/home/jan/horde-git/framework/Prefs/lib/Horde/Prefs/Sql.php&quot;]

Prefs is still using PEAR DB.

FWIW, I don&#039;t see any of these errors when using stuff that relies on the PEAR DB binder.  I am using Postgres though, so this might solely be a Mysql issue.</description> 
   <pubDate>Thu, 20 May 2010 17:18:11 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t58927</link> 
  </item> 
   
  <item> 
   <title>Looks like this has been fixed along the way.</title> 
   <description>Looks like this has been fixed along the way.</description> 
   <pubDate>Tue, 15 Jun 2010 15:22:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9027#t59144</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
