[Tickets #9151] Re: Kronolith, Nag, Mnemo, Turba don't work with Oracle DB
bugs at horde.org
bugs at horde.org
Thu Jul 29 18:02:28 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/9151
------------------------------------------------------------------------------
Ticket | 9151
Updated By | robert at databee.org
Summary | Kronolith, Nag, Mnemo, Turba don't work with Oracle DB
Queue | Horde Framework Packages
Version | FRAMEWORK_3
Type | Bug
State | Feedback
Priority | 2. Medium
Milestone |
Patch |
Owners | Jan Schneider, Michael Rubinsky
------------------------------------------------------------------------------
robert at databee.org (2010-07-29 14:02) wrote:
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->database_name) {
// if ($this->database_name != $this->connected_database_name) {
// $query = 'ALTER SESSION SET CURRENT_SCHEMA = "'
.strtoupper($this->database_name) .'"';
// $result =& $this->_doQuery($query);
// if (PEAR::isError($result)) {
// $err = $this->raiseError($result, null, null,
// 'Could not select the database:
'.$this->database_name, __FUNCTION__);
// return $err;
// }
$this->connected_database_name = $this->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->database_name is set, and if so if it is different
then $this->connected_database_name, which is always true, because
$this->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 "ALTER
SESSION SET CURRENT_SCHEMA" which has to fail, because
this->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->database_name was set to an empty string aftre a successfull
connect- which at that time didn't made sense to me - but I can't find
it any more.
Again, my php-knowledge ends here and I have to pass the ball back to you...
More information about the bugs
mailing list