<?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>Kronolith, Nag, Mnemo, Turba don&#039;t work with Oracle DB</title> 
  <pubDate>Tue, 07 Apr 2026 10:53:12 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9151</link> 
  <atom:link rel="self" type="application/rss+xml" title="Kronolith, Nag, Mnemo, Turba don&#039;t work with Oracle DB" href="https://bugs.horde.org/ticket/9151/rss" /> 
  <description>Kronolith, Nag, Mnemo, Turba don&#039;t work with Oracle DB</description> 
 
   
   
  <item> 
   <title>When using Oracle as Database, the Connections of the calend</title> 
   <description>When using Oracle as Database, the Connections of the calender, adress, notes and tasks Apllications to the Database fail.

The Error shown in the Web is: &quot;MDB2 Error: not found&quot;
In the horde.log the error shows for example as:

 HORDE [error] [turba] MDB2 Error: not found: [Error message: not a valid connection string or environment variable [ORACLE_SID|TWO_TASK] not set]
 [pid 15777 on line 452 of &quot;/home/horde/horde-webmail-1.2.6/turba/lib/Turba.php&quot;]

Horde itself can open and use the database.

I have only very limited knowledge and experience with php and no infrastructure für debugging, but as far as I got (opened my own logfile and dumped variables and arrays), I found out that at some place the connect-string was used as User-Name.

See contents of the dsn Array from my own logging:
dsn: Array
(
    [phptype] =&gt; oci8
    [dbsyntax] =&gt; oci8
    [username] =&gt; horde
    [password] =&gt; HORDE
    [protocol] =&gt;
    [hostspec] =&gt;
    [port] =&gt;
    [socket] =&gt;
    [database] =&gt; dwo/dbrmz.robbienet.local
    [mode] =&gt;
    [persistent] =&gt;
)

This is, how it should be (right at the start in the MDB2.php File)

And this is, what&#039;s passed to the oci8.php for the connection:

 dsn: Array
(
    [phptype] =&gt; oci8
    [dbsyntax] =&gt; oci8
    [username] =&gt; dwo/dbrmz.robbienet.local
    [password] =&gt; HORDE
    [protocol] =&gt;
    [hostspec] =&gt;
    [port] =&gt;
    [socket] =&gt;
    [database] =&gt; dwo/dbrmz.robbienet.local
    [mode] =&gt;
    [persistent] =&gt;
)

The username is now the connect-string.

Somewhere in the Web I found the hint, that one should set the &#039;emulate_database&#039; option to false and I tried that, but got no luck - probably I did wrong...

I do have a (kronolith)  H3 (2.1.5) install, where this all works properly.</description> 
   <pubDate>Tue, 27 Jul 2010 13:35:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59437</link> 
  </item> 
   
  <item> 
   <title>So, installation went fine and other database access like se</title> 
   <description>So, installation went fine and other database access like setting preferences works fine? Those don&#039;t use MDB2, so the problem is probably somewhere in passing the parameters to MDB2. Or rather, like you already found out, in passing the parameters inside MDB2.</description> 
   <pubDate>Tue, 27 Jul 2010 16:39:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59440</link> 
  </item> 
   
  <item> 
   <title>Yepp installation went fine, everything is up and running an</title> 
   <description>Yepp installation went fine, everything is up and running and looks good.
The trouble starts, when you actually trying to do something, like create an adressbok.

I See established Connections to my database, querying prefs and alarms.
Tables with data in, that have been read from and written to include 
HORDE_ALAMS
HORDE_PREFS
HORDE_TOKENS
IMP_SENTMAIL
INGO_RULES
...</description> 
   <pubDate>Tue, 27 Jul 2010 16:56:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59445</link> 
  </item> 
   
  <item> 
   <title>The emulate_database option should indeed keep the username </title> 
   <description>The emulate_database option should indeed keep the username from being assigned the database name. Where and how did you set it when you tried that?</description> 
   <pubDate>Tue, 27 Jul 2010 17:15:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59447</link> 
  </item> 
   
  <item> 
   <title>It was in a file called /lib/Horde/SQL/Manager.php

There </title> 
   <description>It was in a file called /lib/Horde/SQL/Manager.php

There is a function:
    function getInstance($dsn = array())
    {
        // Merge local options with Horde database config.
        if (isset($GLOBALS[&#039;conf&#039;][&#039;sql&#039;])) {
            $dsn = array_merge($GLOBALS[&#039;conf&#039;][&#039;sql&#039;], $dsn);
        }
        unset($dsn[&#039;charset&#039;]);
        $options = array(&#039;seqcol_name&#039; =&gt; &#039;id&#039;,
                         &#039;portability&#039; =&gt; MDB2_PORTABILITY_ALL &amp; ~MDB2_PORTABILITY_FIX_CASE,
                         &#039;force_defaults&#039; =&gt; false,
                         &#039;emulate_database&#039; =&gt; false);
                         ^^^^^^^^^^^^^^^^^^
This is for sure not the right place for doing so, since it affects the other db-drivers, too...

I&#039;m a Oracle Database  Architect/Developer/Administrator, and have no experience in php-programming, so I decided at this to leave that to the ones who know, what they are doing
</description> 
   <pubDate>Tue, 27 Jul 2010 19:15:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59457</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Disable emul</title> 
   <description>Changes have been made in CVS for this ticket:

Disable emulate_database for MDB2/Oracle (Bug #9151).
http://cvs.horde.org/diff.php/framework/Share/Share/sql.php?rt=horde&amp;r1=1.1.2.58&amp;r2=1.1.2.59&amp;ty=u</description> 
   <pubDate>Tue, 27 Jul 2010 20:16:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59458</link> 
  </item> 
   
  <item> 
   <title>Try this patch?</title> 
   <description>Try this patch?</description> 
   <pubDate>Tue, 27 Jul 2010 20:17:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59459</link> 
  </item> 
   
  <item> 
   <title>tried - worked. Thanks a lot.
Connections to the database a</title> 
   <description>tried - worked. Thanks a lot.
Connections to the database are made and its doing inserts and updates.

BUT: Now I got lots of errors like this:

 [pid 8797 on line 470 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]
Jul 27 23:47:49 HORDE [error] [mnemo] MDB2 Error: unknown error: _doQuery: [Error message: Could not execute statement]
[Last executed query: SELECT DISTINCT s.*  FROM mnemo_shares s  LEFT JOIN mnemo_shares_users AS u ON u.share_id = s.share_id WHERE s.share_owner = &#039;rmarz&#039; OR (bitand(s.per
m_creator, 4) = 4) OR (bitand(s.perm_default, 4) = 4) OR ( u.user_uid = &#039;rmarz&#039; AND (bitand(u.perm, 4) = 4)) ORDER BY s.attribute_name ASC]
[Native code: 905]
[Native message: ORA-00905: missing keyword]

which is caused by the &quot;AS&quot; between table-name and alias in the outer-joined table.
In this rare case, Oracle follows hard the sql99-Standard, which says, that &quot;as&quot; is allowed for column aliases and does not mention it for table-aliases.


</description> 
   <pubDate>Tue, 27 Jul 2010 22:05:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59460</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Don&#039;t use &quot;A</title> 
   <description>Changes have been made in CVS for this ticket:

Don&#039;t use &quot;AS&quot; for table aliases.
Bug: 9151
http://cvs.horde.org/diff.php/framework/Share/Share/sql.php?rt=horde&amp;r1=1.1.2.59&amp;r2=1.1.2.60&amp;ty=u
http://cvs.horde.org/diff.php/framework/Share/Share/sql_hierarchical.php?rt=horde&amp;r1=1.17.2.28&amp;r2=1.17.2.29&amp;ty=u</description> 
   <pubDate>Tue, 27 Jul 2010 23:12:05 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59461</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

MFB, don&#039;t u</title> 
   <description>Changes have been made in Git for this ticket:

MFB, don&#039;t use &#039;AS&#039; in table aliases.
Some of the changes from CVS were already present in Git, this is the remaining changes.

Bug: 9151

http://git.horde.org/diff.php/framework/Share/lib/Horde/Share/Sql/Hierarchical.php?rt=horde-git&amp;r1=df95b1257ff0201b44aec092cdd4d70018beb14f&amp;r2=7ebcfde1f90ad9c41d603ada10c1ef51567852e5</description> 
   <pubDate>Tue, 27 Jul 2010 23:15:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59463</link> 
  </item> 
   
  <item> 
   <title>try now?</title> 
   <description>try now?</description> 
   <pubDate>Tue, 27 Jul 2010 23:19:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59465</link> 
  </item> 
   
  <item> 
   <title>way better - we&#039;re getting close, I think.

Now getting th</title> 
   <description>way better - we&#039;re getting close, I think.

Now getting those errors:

Jul 28 01:25:16 HORDE [error] [kronolith] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 8796 on line 1348 of &quot;/home/horde/horde-webmail-1.2.6/kronolith/lib/Kronolith.php&quot;]
Jul 28 01:25:16 HORDE [error] [kronolith] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 8742 on line 470 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]

Have no Idea, what that could mean...

Looking at the log, I found another error:

Jul 28 01:22:43 HORDE [error] [imp] DB Error: unknown error: SELECT sentmail_recipient, count(*) AS sentmail_count FROM imp_sentmail WHERE sentmail_who = &#039;rmarz&#039; AND sentm
ail_success = 1 AND sentmail_action in (&#039;new&#039;, &#039;forward&#039;, &#039;reply&#039;, &#039;redirect&#039;) GROUP BY sentmail_recipient ORDER BY sentmail_count DESC LIMIT 10 [nativecode=ORA-00933: SQL
 command not properly ended] [pid 4593 on line 120 of &quot;/home/horde/horde-webmail-1.2.6/imp/lib/Sentmail/sql.php&quot;]

it is the &quot;LIMIT 10&quot; at the end.
What should that do? Limit the resultset to 10 rows?
&quot;where rownum &lt;10&quot; would do that
I would use no restriction at all and fetch only the first 10 rows...</description> 
   <pubDate>Tue, 27 Jul 2010 23:38:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59466</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Use PEAR DB&#039;</title> 
   <description>Changes have been made in CVS for this ticket:

Use PEAR DB&#039;s limitQuery() method, don&#039;t hard code mysql-specific LIMIT syntax.
Bug: 9151
http://cvs.horde.org/diff.php/imp/lib/Sentmail/sql.php?rt=horde&amp;r1=1.12.2.2&amp;r2=1.12.2.3&amp;ty=u</description> 
   <pubDate>Wed, 28 Jul 2010 05:19:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59469</link> 
  </item> 
   
  <item> 
   <title>now?</title> 
   <description>now?</description> 
   <pubDate>Wed, 28 Jul 2010 05:20:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59470</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Set emulate_</title> 
   <description>Changes have been made in CVS for this ticket:

Set emulate_database option for Oracle (Bug #9151).
http://cvs.horde.org/diff.php/ansel/lib/Ansel.php?rt=horde&amp;r1=1.517.2.81&amp;r2=1.517.2.82&amp;ty=u
http://cvs.horde.org/diff.php/framework/Auth/Auth/Signup/Attic/sql.php?rt=horde&amp;r1=1.3.2.5&amp;r2=1.3.2.6&amp;ty=u</description> 
   <pubDate>Wed, 28 Jul 2010 08:55:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59476</link> 
  </item> 
   
  <item> 
   <title>Applied imp and Auth patch.
I do not have a file named Anse</title> 
   <description>Applied imp and Auth patch.
I do not have a file named Ansel.php at all.

IMP errors are gone.

The others remain.
Actual Symptomns: I can create Adresses and Events (find them in the database), but cannot see them in the Web.

Error log:

Jul 28 11:10:59 HORDE [error] [kronolith] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 25403 on line 470 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]
Jul 28 11:10:59 HORDE [error] [kronolith] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 25403 on line 1348 of &quot;/home/horde/horde-webmail-1.2.6/kronolith/lib/Kronolith.php&quot;]
Jul 28 11:10:59 HORDE [error] [nag] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 25403 on line 470 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]
Jul 28 11:10:59 HORDE [error] [nag] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 25403 on line 295 of &quot;/home/horde/horde-webmail-1.2.6/nag/lib/Nag.php&quot;]
Jul 28 11:11:05 HORDE [error] [kronolith] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 25403 on line 470 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]
Jul 28 11:11:05 HORDE [error] [kronolith] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 25403 on line 1348 of &quot;/home/horde/horde-webmail-1.2.6/kronolith/lib/Kronolith.php&quot;]
Jul 28 11:11:05 HORDE [error] [nag] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 25403 on line 470 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]
Jul 28 11:11:05 HORDE [error] [nag] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 25403 on line 295 of &quot;/home/horde/horde-webmail-1.2.6/nag/lib/Nag.php&quot;]
</description> 
   <pubDate>Wed, 28 Jul 2010 09:16:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59477</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

MFB: Set emu</title> 
   <description>Changes have been made in Git for this ticket:

MFB: Set emulate_database option for Oracle (Bug #9151).

http://git.horde.org/diff.php/ansel/lib/Ansel.php?rt=horde-git&amp;r1=d934dfda17564153b68ab78ccbd04828b95f2546&amp;r2=0e2e0fae606be0700dbd617d488a06755a806f8d
http://git.horde.org/diff.php/framework/Share/lib/Horde/Share/Sql.php?rt=horde-git&amp;r1=df95b1257ff0201b44aec092cdd4d70018beb14f&amp;r2=0e2e0fae606be0700dbd617d488a06755a806f8d</description> 
   <pubDate>Wed, 28 Jul 2010 10:31:11 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59478</link> 
  </item> 
   
  <item> 
   <title>I guess, I shall not apply these patches, do I?
I neither h</title> 
   <description>I guess, I shall not apply these patches, do I?
I neither have a file 
/ansel/lib/Ansel.php
nor do I have 
/framework/Share/lib/Horde/Share/Sql.php

Or am I wrong?
</description> 
   <pubDate>Wed, 28 Jul 2010 12:05:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59480</link> 
  </item> 
   
  <item> 
   <title>You&#039;re right, those are forward ports for the Git version.</title> 
   <description>You&#039;re right, those are forward ports for the Git version.</description> 
   <pubDate>Wed, 28 Jul 2010 12:11:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59481</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

Log the quer</title> 
   <description>Changes have been made in CVS for this ticket:

Log the query
Bug: 9151
http://cvs.horde.org/diff.php/framework/Share/Share/sql.php?rt=horde&amp;r1=1.1.2.60&amp;r2=1.1.2.61&amp;ty=u</description> 
   <pubDate>Wed, 28 Jul 2010 15:28:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59482</link> 
  </item> 
   
  <item> 
   <title>The query that&#039;s causing this error should now be logged in </title> 
   <description>The query that&#039;s causing this error should now be logged in the Horde log, can you try again and see if you see anything weird in the query that could be causing this in Oracle?</description> 
   <pubDate>Wed, 28 Jul 2010 15:29:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59483</link> 
  </item> 
   
  <item> 
   <title>Her comes the log:

Jul 28 21:27:00 HORDE [debug] [kronoli</title> 
   <description>Her comes the log:

Jul 28 21:27:00 HORDE [debug] [kronolith] Hook _horde_hook_share_init in application horde not called. [pid 7571 on line 1736 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde.php&quot;]
Jul 28 21:27:00 HORDE [debug] [kronolith] SQL query by Horde_Share_sql::listShares: SELECT DISTINCT s.*  FROM kronolith_shares s  LEFT JOIN kronolith_shares_users u ON u.share_id = s.share_id WHERE s.share_owner = &#039;rmarz&#039; OR (bitand(s.perm_creator, 2) = 2) OR (bitand(s.perm_default, 2) = 2) OR ( u.user_uid = &#039;rmarz&#039; AND (bitand(u.perm, 2) = 2)) ORDER BY s.attribute_name ASC [pid 7571 on line 469 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]
Jul 28 21:27:00 HORDE [error] [kronolith] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 7571 on line 473 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]

The query is valid, which is no surprise to me, because the Error message is not issued by oracle.

IMHO MDB2 says, that it cannot connect (&quot;select&quot;) to the database.
&quot;dwo/dbrmz.robbienet.local&quot; is my connect string (server/databaseServcieName)
</description> 
   <pubDate>Wed, 28 Jul 2010 19:36:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59497</link> 
  </item> 
   
  <item> 
   <title>I did some debugging:

the error is thrown in the connect(</title> 
   <description>I did some debugging:

the error is thrown in the connect() function of
pear/php/MDB2/Driver/oci8.php
The function starts at line 429.

The problem is the following part:

//        if ($this-&gt;database_name) {
//            if ($this-&gt;database_name != $this-&gt;connected_database_name) {
//                $query = &#039;ALTER SESSION SET CURRENT_SCHEMA = &quot;&#039; .strtoupper($this-&gt;database_name) .&#039;&quot;&#039;;
//                $result =&amp; $this-&gt;_doQuery($query);
//                if (PEAR::isError($result)) {
//                    $err = $this-&gt;raiseError($result, null, null,
//                        &#039;Could not select the database: &#039;.$this-&gt;database_name, __FUNCTION__);
//                    return $err;
//                }
                $this-&gt;connected_database_name = $this-&gt;database_name;
//            }
//        }


As you can see, I uncommented all, except for on line.
I do have no errors any more in the log and have all features available.
But, this is only my workaround and cannot be the final fix.

What is done here, as far as I figured out:
It checks, if this-&gt;database_name is set, and if so if it is different then $this-&gt;connected_database_name, which is always true, because $this-&gt;connected_database_name is set to an empty string a few lines above.

With these conditions fulfilled, it assumes, that we have to switch to a different schema inside the oracle database and issues a &quot;ALTER SESSION SET CURRENT_SCHEMA&quot; which has to fail, because this-&gt;database_name is set to the connect-string.

It can succeed, only when I connect to schema HORDE inside a database named horde using a tnsnames.ora. That is not unlikely to happen in a testing environment...

I think, a few days ago, I saw inside the code, that at some place this-&gt;database_name was set to an empty string aftre a successfull connect- which at that time didn&#039;t made sense to me - but I can&#039;t find it any more.

Again, my php-knowledge ends here and I have to pass the ball back to you...
</description> 
   <pubDate>Thu, 29 Jul 2010 18:02:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59505</link> 
  </item> 
   
  <item> 
   <title>Yes, we purposefully set the conncted_database_name to &#039;&#039; in</title> 
   <description>Yes, we purposefully set the conncted_database_name to &#039;&#039; in the sql share driver. This is to workaround an issue with MDB2  not being able to detect when a database connection changes external to it&#039;s code. See Bug: 6997 for more detail on this.  What is supposed to happen is MDB2 re-selects the database in this case. That is what the commented out code is doing. I have no idea why it&#039;s failing, as $this-&gt;database_name should be the correct name to connect to. That being said, I&#039;m no oracle expert, so I can&#039;t speak to the correctness of the statement being performed there.

See if you can add the line:

var_dump($result);

right before the PEAR::isError() statement to see if you can get a more detailed error message. Unfortunately, if the issue is with code in this file, it&#039;s not a Horde issue - as this is from PEAR.

</description> 
   <pubDate>Thu, 29 Jul 2010 19:13:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59506</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Don&#039;t use AS</title> 
   <description>Changes have been made in Git for this ticket:

Don&#039;t use AS for table aliases (Bug #9151)

http://git.horde.org/diff.php/framework/Rdo/lib/Horde/Rdo/Query.php?rt=horde-git&amp;r1=28a5d9e2b445583cf648db1c4583c24b004dbcf2&amp;r2=a0b4b13be809a738abe7ade1acee1718a05077d2</description> 
   <pubDate>Mon, 02 Aug 2010 01:16:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59520</link> 
  </item> 
   
  <item> 
   <title>Ping? Any new data, or is this resolved for the OP?</title> 
   <description>Ping? Any new data, or is this resolved for the OP?</description> 
   <pubDate>Sat, 14 Aug 2010 15:02:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59620</link> 
  </item> 
   
  <item> 
   <title>via email:

Hi,

I&#039;m trying to update the ticket, but th</title> 
   <description>via email:

Hi,

I&#039;m trying to update the ticket, but the website won&#039;t let me - always complaining about the wrong captcha...

anyway, her goes the text:

Problem is still there, but my workaround fixes it for me.
Unfortunatly I&#039;ve been very busy in my job for the last 2 weeks and still not through with it...

Oracle released a new OCI8 driver last week - will try that and figure out in the documentation, what the parameters realy mean...
I plan to do a fresh installation from git and try to trace it bit by bit...

I&#039;m good at Oracle but have absolutly no experience with php...

regards

Robert

-- 
</description> 
   <pubDate>Sun, 15 Aug 2010 16:08:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59624</link> 
  </item> 
   
  <item> 
   <title>I spent the whole day debugging and trying out stuff...
The</title> 
   <description>I spent the whole day debugging and trying out stuff...
The following is as far as I got with the Problem:

All Database-Connections except one work fine.
It narrows done to the function _connect() in file horde-webmail-1.2.6/lib/Horde/Share/sql.php

I added the following check:
        $query  = &#039;select sysdate from dual&#039;;
        $result = $this-&gt;_write_db-&gt;query($query);
        if (is_a($result, &#039;PEAR_Error&#039;)) {
            Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR);
            Horde::logMessage(sprintf(&#039;RMZ: Error _write_db %s&#039;, print_r($this-&gt;_write_db, true)), __FILE__, __LINE__, PEAR_LOG_NOTICE);
            return $result;
        }

and it always fails at this point.

I positive example is the  function &amp;listShares in the same file (roughly line 450..)
This one always works.

I&#039;m not sure, what&#039;s failing, but the main functionality - adding, modfiying and viewing addresses, events and memos - is available.
So the connection does work most of the time.

I added a print_r($this-&gt;_write_db, true) for both - a working connection and a failing, but there is not much of a difference...

If I have to guess, I would say, that there is one more of these thingies missing:

            switch ($this-&gt;_write_db-&gt;phptype) {
            case &#039;oci8&#039;:
                $this-&gt;_write_db-&gt;setOption(&#039;emulate_database&#039;, false);
                break;

But I have no idea where.

So for your debúgging-pleasure, here is a extract from my log, first working, then failing:
I do use this connect-information: horde/HORDE@dwo/dbrmz.robbienet.local, where horde is the user, HORDE the password, dwo the host and dbrmz.robbienet.local the database service name.

-------------------------------------------------------------------------------------------
Working Connection:
cat error-db.txt
Aug 18 18:44:36 HORDE [notice] [kronolith] RMZ: Working _db MDB2_Driver_oci8 Object
(
    [string_quoting] =&gt; Array
        (
            [start] =&gt; &#039;
            [end] =&gt; &#039;
            [escape] =&gt; &#039;
            [escape_pattern] =&gt; @
        )

    [identifier_quoting] =&gt; Array
        (
            [start] =&gt; &quot;
            [end] =&gt; &quot;
            [escape] =&gt; &quot;
        )

    [uncommitedqueries] =&gt; 0
    [db_index] =&gt; 1
    [dsn] =&gt; Array
        (
            [phptype] =&gt; oci8
            [dbsyntax] =&gt; oci8
            [username] =&gt; horde
            [password] =&gt; HORDE
            [protocol] =&gt;
            [hostspec] =&gt;
            [port] =&gt;
            [socket] =&gt;
            [database] =&gt;
            [mode] =&gt;
            [persistent] =&gt;
        )

    [connected_dsn] =&gt; Array
        (
            [phptype] =&gt; oci8
            [dbsyntax] =&gt; oci8
            [username] =&gt; horde
            [password] =&gt; HORDE
            [protocol] =&gt;
            [hostspec] =&gt;
            [port] =&gt;
            [socket] =&gt;
            [database] =&gt;
            [mode] =&gt;
            [persistent] =&gt;
        )

    [connection] =&gt; Resource id #34
    [opened_persistent] =&gt;
    [database_name] =&gt; dwo/dbrmz.robbienet.local
    [connected_database_name] =&gt;
    [connected_server_info] =&gt;
    [supported] =&gt; Array
        (
            [sequences] =&gt; 1
            [indexes] =&gt; 1
            [affected_rows] =&gt; 1
            [summary_functions] =&gt; 1
            [order_by_text] =&gt; 1
            [transactions] =&gt; 1
            [savepoints] =&gt; 1
            [current_id] =&gt; 1
            [limit_queries] =&gt; 1
            [LOBs] =&gt; 1
            [replace] =&gt; emulated
            [sub_selects] =&gt; 1
            [triggers] =&gt; 1
            [auto_increment] =&gt;
            [primary_key] =&gt; 1
            [result_introspection] =&gt; 1
            [prepared_statements] =&gt; 1
            [identifier_quoting] =&gt; 1
            [pattern_escaping] =&gt; 1
            [new_link] =&gt; 1
        )

    [options] =&gt; Array
        (
            [ssl] =&gt;
            [field_case] =&gt; 0
            [disable_query] =&gt;
            [result_class] =&gt; MDB2_Result_%s
            [buffered_result_class] =&gt; MDB2_BufferedResult_%s
            [result_wrap_class] =&gt;
            [result_buffering] =&gt; 1
            [fetch_class] =&gt; stdClass
            [persistent] =&gt;
            [debug] =&gt; 1
            [debug_handler] =&gt; Array
                (
                    [0] =&gt; Horde_Share_sql Object
                        (
                            [_db] =&gt; MDB2_Driver_oci8 Object
 *RECURSION*
                            [_write_db] =&gt; MDB2_Driver_oci8 Object
 *RECURSION*
                            [_params] =&gt; Array
                                (
                                    [persistent] =&gt;
                                    [username] =&gt; horde
                                    [password] =&gt; HORDE
                                    [database] =&gt; dwo/dbrmz.robbienet.local
                                    [charset] =&gt; utf-8
                                    [phptype] =&gt; oci8
                                    [hostspec] =&gt;
                                )

                            [_table] =&gt; kronolith_shares
                            [_shareObject] =&gt; Horde_Share_Object_sql
                            [_app] =&gt; kronolith
                            [_root] =&gt;
                            [_cache] =&gt; Array
                                (
                                )

                            [_shareMap] =&gt; Array
                                (
                                )

                            [_listcache] =&gt; Array
                                (
                                )

                            [_sortList] =&gt;
                        )

                    [1] =&gt; _selectDB
                )

            [debug_expanded_output] =&gt;
            [default_text_field_length] =&gt; 2000
            [lob_buffer_length] =&gt; 8192
            [log_line_break] =&gt;

            [idxname_format] =&gt; %s_idx
            [seqname_format] =&gt; %s_seq
            [savepoint_format] =&gt; MDB2_SAVEPOINT_%s
            [statement_format] =&gt; MDB2_STATEMENT_%1$s_%2$s
            [seqcol_name] =&gt; id
            [quote_identifier] =&gt;
            [use_transactions] =&gt; 1
            [decimal_places] =&gt; 2
            [portability] =&gt; 81
            [modules] =&gt; Array
                (
                    [ex] =&gt; Extended
                    [dt] =&gt; Datatype
                    [mg] =&gt; Manager
                    [rv] =&gt; Reverse
                    [na] =&gt; Native
                    [fc] =&gt; Function
                )

            [emulate_prepared] =&gt;
            [datatype_map] =&gt; Array
                (
                )

            [datatype_map_callback] =&gt; Array
                (
                )

            [nativetype_map_callback] =&gt; Array
                (
                )

            [lob_allow_url_include] =&gt;
            [bindname_format] =&gt; (?:\d+)|(?:[a-zA-Z][a-zA-Z0-9_]*)
            [max_identifiers_length] =&gt; 30
            [default_fk_action_onupdate] =&gt; RESTRICT
            [default_fk_action_ondelete] =&gt; RESTRICT
            [DBA_username] =&gt;
            [DBA_password] =&gt;
            [database_name_prefix] =&gt;
            [emulate_database] =&gt;
            [default_tablespace] =&gt;
            [result_prefetching] =&gt;
        )

    [sql_comments] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [start] =&gt; --
                    [end] =&gt;

                    [escape] =&gt;
                )

            [1] =&gt; Array
                (
                    [start] =&gt; /*
                    [end] =&gt; */
                    [escape] =&gt;
                )

        )

    [wildcards] =&gt; Array
        (
            [0] =&gt; %
            [1] =&gt; _
        )

    [as_keyword] =&gt;  AS
    [warnings] =&gt; Array
        (
        )

    [debug_output] =&gt;
    [in_transaction] =&gt;
    [nested_transaction_counter] =&gt;
    [has_transaction_error] =&gt;
    [offset] =&gt; 0
    [limit] =&gt; 0
    [phptype] =&gt; oci8
    [dbsyntax] =&gt; oci8
    [last_query] =&gt; SELECT DISTINCT s.*  FROM kronolith_shares s  LEFT JOIN kronolith_shares_users u ON u.share_id = s.share_id WHERE s.share_owner = &#039;rmarz&#039; OR (bitand(s.perm_creator, 2) = 2) OR (bitand(s.perm_default, 2) = 2) OR ( u.user_uid = &#039;rmarz&#039; AND (bitand(u.perm, 2) = 2)) ORDER BY s.attribute_name ASC
    [fetchmode] =&gt; 1
    [modules] =&gt; Array
        (
            [Datatype] =&gt; MDB2_Driver_Datatype_oci8 Object
                (
                    [valid_default_values] =&gt; Array
                        (
                            [text] =&gt;
                            [boolean] =&gt; 1
                            [integer] =&gt; 0
                            [decimal] =&gt; 0
                            [float] =&gt; 0
                            [timestamp] =&gt; 1970-01-01 00:00:00
                            [time] =&gt; 00:00:00
                            [date] =&gt; 1970-01-01
                            [clob] =&gt;
                            [blob] =&gt;
                        )

                    [lobs] =&gt; Array
                        (
                        )

                    [db_index] =&gt; 1
                )

        )

    [destructor_registered] =&gt; 1
    [_debug] =&gt;
    [_default_error_mode] =&gt;
    [_default_error_options] =&gt;
    [_default_error_handler] =&gt;
    [_error_class] =&gt; PEAR_Error
    [_expected_errors] =&gt; Array
        (
        )

    [datatype] =&gt; MDB2_Driver_Datatype_oci8 Object
        (
            [valid_default_values] =&gt; Array
                (
                    [text] =&gt;
                    [boolean] =&gt; 1
                    [integer] =&gt; 0
                    [decimal] =&gt; 0
                    [float] =&gt; 0
                    [timestamp] =&gt; 1970-01-01 00:00:00
                    [time] =&gt; 00:00:00
                    [date] =&gt; 1970-01-01
                    [clob] =&gt;
                    [blob] =&gt;
                )

            [lobs] =&gt; Array
                (
                )

            [db_index] =&gt; 1
        )

    [loaded_version_modules] =&gt; Array
        (
            [0] =&gt; datatype
        )

)
 [pid 17321 on line 479 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]

---------------------------------------------------------------------------------------
Failing connection:
cat error-db.txt
Aug 18 18:44:36 HORDE [error] [kronolith] MDB2 Error: not found: [Error message: Could not select the database: dwo/dbrmz.robbienet.local]
 [pid 17321 on line 835 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]
Aug 18 18:44:36 HORDE [notice] [kronolith] RMZ: Error _write_db MDB2_Driver_oci8 Object
(
    [string_quoting] =&gt; Array
        (
            [start] =&gt; &#039;
            [end] =&gt; &#039;
            [escape] =&gt; &#039;
            [escape_pattern] =&gt; @
        )

    [identifier_quoting] =&gt; Array
        (
            [start] =&gt; &quot;
            [end] =&gt; &quot;
            [escape] =&gt; &quot;
        )

    [uncommitedqueries] =&gt; 0
    [db_index] =&gt; 1
    [dsn] =&gt; Array
        (
            [phptype] =&gt; oci8
            [dbsyntax] =&gt; oci8
            [username] =&gt; horde
            [password] =&gt; HORDE
            [protocol] =&gt;
            [hostspec] =&gt;
            [port] =&gt;
            [socket] =&gt;
            [database] =&gt;
            [mode] =&gt;
            [persistent] =&gt;
        )

    [connected_dsn] =&gt; Array
        (
            [phptype] =&gt; oci8
            [dbsyntax] =&gt; oci8
            [username] =&gt; horde
            [password] =&gt; HORDE
            [protocol] =&gt;
            [hostspec] =&gt;
            [port] =&gt;
            [socket] =&gt;
            [database] =&gt;
            [mode] =&gt;
            [persistent] =&gt;
        )

    [connection] =&gt; Resource id #34
    [opened_persistent] =&gt;
    [database_name] =&gt; dwo/dbrmz.robbienet.local
    [connected_database_name] =&gt;
    [connected_server_info] =&gt;
    [supported] =&gt; Array
        (
            [sequences] =&gt; 1
            [indexes] =&gt; 1
            [affected_rows] =&gt; 1
            [summary_functions] =&gt; 1
            [order_by_text] =&gt; 1
            [transactions] =&gt; 1
            [savepoints] =&gt; 1
            [current_id] =&gt; 1
            [limit_queries] =&gt; 1
            [LOBs] =&gt; 1
            [replace] =&gt; emulated
            [sub_selects] =&gt; 1
            [triggers] =&gt; 1
            [auto_increment] =&gt;
            [primary_key] =&gt; 1
            [result_introspection] =&gt; 1
            [prepared_statements] =&gt; 1
            [identifier_quoting] =&gt; 1
            [pattern_escaping] =&gt; 1
            [new_link] =&gt; 1
        )

    [options] =&gt; Array
        (
            [ssl] =&gt;
            [field_case] =&gt; 0
            [disable_query] =&gt;
            [result_class] =&gt; MDB2_Result_%s
            [buffered_result_class] =&gt; MDB2_BufferedResult_%s
            [result_wrap_class] =&gt;
            [result_buffering] =&gt; 1
            [fetch_class] =&gt; stdClass
            [persistent] =&gt;
            [debug] =&gt; 1
            [debug_handler] =&gt; Array
                (
                    [0] =&gt; Horde_Share_sql Object
                        (
                            [_db] =&gt; MDB2_Driver_oci8 Object
 *RECURSION*
                            [_write_db] =&gt; MDB2_Driver_oci8 Object
 *RECURSION*
                            [_params] =&gt; Array
                                (
                                    [persistent] =&gt;
                                    [username] =&gt; horde
                                    [password] =&gt; HORDE
                                    [database] =&gt; dwo/dbrmz.robbienet.local
                                    [charset] =&gt; utf-8
                                    [phptype] =&gt; oci8
                                    [hostspec] =&gt;
                                )

                            [_table] =&gt; kronolith_shares
                            [_shareObject] =&gt; Horde_Share_Object_sql
                            [_app] =&gt; kronolith
                            [_root] =&gt;
                            [_cache] =&gt; Array
                                (
                                )

                            [_shareMap] =&gt; Array
                                (
                                )

                            [_listcache] =&gt; Array
                                (
                                )

                            [_sortList] =&gt;
                        )

                    [1] =&gt; _selectDB
                )

            [debug_expanded_output] =&gt;
            [default_text_field_length] =&gt; 2000
            [lob_buffer_length] =&gt; 8192
            [log_line_break] =&gt;

            [idxname_format] =&gt; %s_idx
            [seqname_format] =&gt; %s_seq
            [savepoint_format] =&gt; MDB2_SAVEPOINT_%s
            [statement_format] =&gt; MDB2_STATEMENT_%1$s_%2$s
            [seqcol_name] =&gt; id
            [quote_identifier] =&gt;
            [use_transactions] =&gt; 1
            [decimal_places] =&gt; 2
            [portability] =&gt; 81
            [modules] =&gt; Array
                (
                    [ex] =&gt; Extended
                    [dt] =&gt; Datatype
                    [mg] =&gt; Manager
                    [rv] =&gt; Reverse
                    [na] =&gt; Native
                    [fc] =&gt; Function
                )

            [emulate_prepared] =&gt;
            [datatype_map] =&gt; Array
                (
                )

            [datatype_map_callback] =&gt; Array
                (
                )

            [nativetype_map_callback] =&gt; Array
                (
                )

            [lob_allow_url_include] =&gt;
            [bindname_format] =&gt; (?:\d+)|(?:[a-zA-Z][a-zA-Z0-9_]*)
            [max_identifiers_length] =&gt; 30
            [default_fk_action_onupdate] =&gt; RESTRICT
            [default_fk_action_ondelete] =&gt; RESTRICT
            [DBA_username] =&gt;
            [DBA_password] =&gt;
            [database_name_prefix] =&gt;
            [emulate_database] =&gt;
            [default_tablespace] =&gt;
            [result_prefetching] =&gt;
        )

    [sql_comments] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [start] =&gt; --
                    [end] =&gt;

                    [escape] =&gt;
                )

            [1] =&gt; Array
                (
                    [start] =&gt; /*
                    [end] =&gt; */
                    [escape] =&gt;
                )

        )

    [wildcards] =&gt; Array
        (
            [0] =&gt; %
            [1] =&gt; _
        )

    [as_keyword] =&gt;  AS
    [warnings] =&gt; Array
        (
        )

    [debug_output] =&gt;
    [in_transaction] =&gt;
    [nested_transaction_counter] =&gt;
    [has_transaction_error] =&gt;
    [offset] =&gt; 0
    [limit] =&gt; 0
    [phptype] =&gt; oci8
    [dbsyntax] =&gt; oci8
    [last_query] =&gt; ALTER SESSION SET CURRENT_SCHEMA = &quot;DWO/DBRMZ.ROBBIENET.LOCAL&quot;
    [fetchmode] =&gt; 1
    [modules] =&gt; Array
        (
        )

    [destructor_registered] =&gt; 1
    [_debug] =&gt;
    [_default_error_mode] =&gt;
    [_default_error_options] =&gt;
    [_default_error_handler] =&gt;
    [_error_class] =&gt; PEAR_Error
    [_expected_errors] =&gt; Array
        (
        )

)
 [pid 17321 on line 836 of &quot;/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php&quot;]

</description> 
   <pubDate>Wed, 18 Aug 2010 18:12:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t59667</link> 
  </item> 
   
  <item> 
   <title>Oracle support has been removed for Horde 4 for now.</title> 
   <description>Oracle support has been removed for Horde 4 for now.</description> 
   <pubDate>Mon, 12 Dec 2011 16:42:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9151#t69444</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
