Summary | Kronolith, Nag, Mnemo, Turba don't work with Oracle DB |
Queue | Horde Framework Packages |
Queue Version | FRAMEWORK_3 |
Type | Bug |
State | Not A Bug |
Priority | 2. Medium |
Owners | Horde Developers (at) , jan (at) horde (dot) org, mrubinsk (at) horde (dot) org |
Requester | robert (at) databee (dot) org |
Created | 07/27/2010 (5434 days ago) |
Due | |
Updated | 12/12/2011 (4931 days ago) |
Assigned | 02/20/2011 (5226 days ago) |
Resolved | 12/12/2011 (4931 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Not A Bug
State ⇒ Assigned
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 = 'select sysdate from dual';
$result = $this->_write_db->query($query);
if (is_a($result, 'PEAR_Error')) {
Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR);
Horde::logMessage(sprintf('RMZ: Error _write_db %s',
print_r($this->_write_db, true)), __FILE__, __LINE__, PEAR_LOG_NOTICE);
return $result;
}
and it always fails at this point.
I positive example is the function &listShares in the same file
(roughly line 450..)
This one always works.
I'm not sure, what'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->_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->_write_db->phptype) {
case 'oci8':
$this->_write_db->setOption('emulate_database', 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] => Array
(
[start] => '
[end] => '
[escape] => '
[escape_pattern] => @
)
[identifier_quoting] => Array
(
[start] => "
[end] => "
[escape] => "
)
[uncommitedqueries] => 0
[db_index] => 1
[dsn] => Array
(
[phptype] => oci8
[dbsyntax] => oci8
[username] => horde
[password] => HORDE
[protocol] =>
[hostspec] =>
[port] =>
[socket] =>
[database] =>
[mode] =>
[persistent] =>
)
[connected_dsn] => Array
(
[phptype] => oci8
[dbsyntax] => oci8
[username] => horde
[password] => HORDE
[protocol] =>
[hostspec] =>
[port] =>
[socket] =>
[database] =>
[mode] =>
[persistent] =>
)
[connection] => Resource id
#34[opened_persistent] =>
[database_name] => dwo/dbrmz.robbienet.local
[connected_database_name] =>
[connected_server_info] =>
[supported] => Array
(
[sequences] => 1
[indexes] => 1
[affected_rows] => 1
[summary_functions] => 1
[order_by_text] => 1
[transactions] => 1
[savepoints] => 1
[current_id] => 1
[limit_queries] => 1
[LOBs] => 1
[replace] => emulated
[sub_selects] => 1
[triggers] => 1
[auto_increment] =>
[primary_key] => 1
[result_introspection] => 1
[prepared_statements] => 1
[identifier_quoting] => 1
[pattern_escaping] => 1
[new_link] => 1
)
[options] => Array
(
[ssl] =>
[field_case] => 0
[disable_query] =>
[result_class] => MDB2_Result_%s
[buffered_result_class] => MDB2_BufferedResult_%s
[result_wrap_class] =>
[result_buffering] => 1
[fetch_class] => stdClass
[persistent] =>
[debug] => 1
[debug_handler] => Array
(
[0] => Horde_Share_sql Object
(
[_db] => MDB2_Driver_oci8 Object
*RECURSION*
[_write_db] => MDB2_Driver_oci8 Object
*RECURSION*
[_params] => Array
(
[persistent] =>
[username] => horde
[password] => HORDE
[database] => dwo/dbrmz.robbienet.local
[charset] => utf-8
[phptype] => oci8
[hostspec] =>
)
[_table] => kronolith_shares
[_shareObject] => Horde_Share_Object_sql
[_app] => kronolith
[_root] =>
[_cache] => Array
(
)
[_shareMap] => Array
(
)
[_listcache] => Array
(
)
[_sortList] =>
)
[1] => _selectDB
)
[debug_expanded_output] =>
[default_text_field_length] => 2000
[lob_buffer_length] => 8192
[log_line_break] =>
[idxname_format] => %s_idx
[seqname_format] => %s_seq
[savepoint_format] => MDB2_SAVEPOINT_%s
[statement_format] => MDB2_STATEMENT_%1$s_%2$s
[seqcol_name] => id
[quote_identifier] =>
[use_transactions] => 1
[decimal_places] => 2
[portability] => 81
[modules] => Array
(
[ex] => Extended
[dt] => Datatype
[mg] => Manager
[rv] => Reverse
[na] => Native
[fc] => Function
)
[emulate_prepared] =>
[datatype_map] => Array
(
)
[datatype_map_callback] => Array
(
)
[nativetype_map_callback] => Array
(
)
[lob_allow_url_include] =>
[bindname_format] => (?:\d+)|(?:[a-zA-Z][a-zA-Z0-9_]*)
[max_identifiers_length] => 30
[default_fk_action_onupdate] => RESTRICT
[default_fk_action_ondelete] => RESTRICT
[DBA_username] =>
[DBA_password] =>
[database_name_prefix] =>
[emulate_database] =>
[default_tablespace] =>
[result_prefetching] =>
)
[sql_comments] => Array
(
[0] => Array
(
[start] => --
[end] =>
[escape] =>
)
[1] => Array
(
[start] => /*
[end] => */
[escape] =>
)
)
[wildcards] => Array
(
[0] => %
[1] => _
)
[as_keyword] => AS
[warnings] => Array
(
)
[debug_output] =>
[in_transaction] =>
[nested_transaction_counter] =>
[has_transaction_error] =>
[offset] => 0
[limit] => 0
[phptype] => oci8
[dbsyntax] => oci8
[last_query] => SELECT DISTINCT s.* FROM kronolith_shares s
LEFT JOIN kronolith_shares_users u ON u.share_id = s.share_id WHERE
s.share_owner = 'rmarz' OR (bitand(s.perm_creator, 2) = 2) OR
(bitand(s.perm_default, 2) = 2) OR ( u.user_uid = 'rmarz' AND
(bitand(u.perm, 2) = 2)) ORDER BY s.attribute_name ASC
[fetchmode] => 1
[modules] => Array
(
[Datatype] => MDB2_Driver_Datatype_oci8 Object
(
[valid_default_values] => Array
(
[text] =>
[boolean] => 1
[integer] => 0
[decimal] => 0
[float] => 0
[timestamp] => 1970-01-01 00:00:00
[time] => 00:00:00
[date] => 1970-01-01
[clob] =>
[blob] =>
)
[lobs] => Array
(
)
[db_index] => 1
)
)
[destructor_registered] => 1
[_debug] =>
[_default_error_mode] =>
[_default_error_options] =>
[_default_error_handler] =>
[_error_class] => PEAR_Error
[_expected_errors] => Array
(
)
[datatype] => MDB2_Driver_Datatype_oci8 Object
(
[valid_default_values] => Array
(
[text] =>
[boolean] => 1
[integer] => 0
[decimal] => 0
[float] => 0
[timestamp] => 1970-01-01 00:00:00
[time] => 00:00:00
[date] => 1970-01-01
[clob] =>
[blob] =>
)
[lobs] => Array
(
)
[db_index] => 1
)
[loaded_version_modules] => Array
(
[0] => datatype
)
)
[pid 17321 on line 479 of
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
---------------------------------------------------------------------------------------
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
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
Aug 18 18:44:36 HORDE [notice] [kronolith] RMZ: Error _write_db
MDB2_Driver_oci8 Object
(
[string_quoting] => Array
(
[start] => '
[end] => '
[escape] => '
[escape_pattern] => @
)
[identifier_quoting] => Array
(
[start] => "
[end] => "
[escape] => "
)
[uncommitedqueries] => 0
[db_index] => 1
[dsn] => Array
(
[phptype] => oci8
[dbsyntax] => oci8
[username] => horde
[password] => HORDE
[protocol] =>
[hostspec] =>
[port] =>
[socket] =>
[database] =>
[mode] =>
[persistent] =>
)
[connected_dsn] => Array
(
[phptype] => oci8
[dbsyntax] => oci8
[username] => horde
[password] => HORDE
[protocol] =>
[hostspec] =>
[port] =>
[socket] =>
[database] =>
[mode] =>
[persistent] =>
)
[connection] => Resource id
#34[opened_persistent] =>
[database_name] => dwo/dbrmz.robbienet.local
[connected_database_name] =>
[connected_server_info] =>
[supported] => Array
(
[sequences] => 1
[indexes] => 1
[affected_rows] => 1
[summary_functions] => 1
[order_by_text] => 1
[transactions] => 1
[savepoints] => 1
[current_id] => 1
[limit_queries] => 1
[LOBs] => 1
[replace] => emulated
[sub_selects] => 1
[triggers] => 1
[auto_increment] =>
[primary_key] => 1
[result_introspection] => 1
[prepared_statements] => 1
[identifier_quoting] => 1
[pattern_escaping] => 1
[new_link] => 1
)
[options] => Array
(
[ssl] =>
[field_case] => 0
[disable_query] =>
[result_class] => MDB2_Result_%s
[buffered_result_class] => MDB2_BufferedResult_%s
[result_wrap_class] =>
[result_buffering] => 1
[fetch_class] => stdClass
[persistent] =>
[debug] => 1
[debug_handler] => Array
(
[0] => Horde_Share_sql Object
(
[_db] => MDB2_Driver_oci8 Object
*RECURSION*
[_write_db] => MDB2_Driver_oci8 Object
*RECURSION*
[_params] => Array
(
[persistent] =>
[username] => horde
[password] => HORDE
[database] => dwo/dbrmz.robbienet.local
[charset] => utf-8
[phptype] => oci8
[hostspec] =>
)
[_table] => kronolith_shares
[_shareObject] => Horde_Share_Object_sql
[_app] => kronolith
[_root] =>
[_cache] => Array
(
)
[_shareMap] => Array
(
)
[_listcache] => Array
(
)
[_sortList] =>
)
[1] => _selectDB
)
[debug_expanded_output] =>
[default_text_field_length] => 2000
[lob_buffer_length] => 8192
[log_line_break] =>
[idxname_format] => %s_idx
[seqname_format] => %s_seq
[savepoint_format] => MDB2_SAVEPOINT_%s
[statement_format] => MDB2_STATEMENT_%1$s_%2$s
[seqcol_name] => id
[quote_identifier] =>
[use_transactions] => 1
[decimal_places] => 2
[portability] => 81
[modules] => Array
(
[ex] => Extended
[dt] => Datatype
[mg] => Manager
[rv] => Reverse
[na] => Native
[fc] => Function
)
[emulate_prepared] =>
[datatype_map] => Array
(
)
[datatype_map_callback] => Array
(
)
[nativetype_map_callback] => Array
(
)
[lob_allow_url_include] =>
[bindname_format] => (?:\d+)|(?:[a-zA-Z][a-zA-Z0-9_]*)
[max_identifiers_length] => 30
[default_fk_action_onupdate] => RESTRICT
[default_fk_action_ondelete] => RESTRICT
[DBA_username] =>
[DBA_password] =>
[database_name_prefix] =>
[emulate_database] =>
[default_tablespace] =>
[result_prefetching] =>
)
[sql_comments] => Array
(
[0] => Array
(
[start] => --
[end] =>
[escape] =>
)
[1] => Array
(
[start] => /*
[end] => */
[escape] =>
)
)
[wildcards] => Array
(
[0] => %
[1] => _
)
[as_keyword] => AS
[warnings] => Array
(
)
[debug_output] =>
[in_transaction] =>
[nested_transaction_counter] =>
[has_transaction_error] =>
[offset] => 0
[limit] => 0
[phptype] => oci8
[dbsyntax] => oci8
[last_query] => ALTER SESSION SET CURRENT_SCHEMA =
"DWO/DBRMZ.ROBBIENET.LOCAL"
[fetchmode] => 1
[modules] => Array
(
)
[destructor_registered] => 1
[_debug] =>
[_default_error_mode] =>
[_default_error_options] =>
[_default_error_handler] =>
[_error_class] => PEAR_Error
[_expected_errors] => Array
(
)
)
[pid 17321 on line 836 of
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
Hi,
I'm trying to update the ticket, but the website won'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'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'm good at Oracle but have absolutly no experience with php...
regards
Robert
--
Don't use AS for table aliases (
Bug #9151)http://git.horde.org/diff.php/framework/Rdo/lib/Horde/Rdo/Query.php?rt=horde-git&r1=28a5d9e2b445583cf648db1c4583c24b004dbcf2&r2=a0b4b13be809a738abe7ade1acee1718a05077d2
share driver. This is to workaround an issue with MDB2 not being able
to detect when a database connection changes external to it's code.
See
Bug: 6997for more detail on this. What is supposed to happen isMDB2 re-selects the database in this case. That is what the commented
out code is doing. I have no idea why it's failing, as
$this->database_name should be the correct name to connect to. That
being said, I'm no oracle expert, so I can'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's not a Horde issue - as this is from PEAR.
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...
Jul 28 21:27:00 HORDE [debug] [kronolith] Hook _horde_hook_share_init
in application horde not called. [pid 7571 on line 1736 of
"/home/horde/horde-webmail-1.2.6/lib/Horde.php"]
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 = 'rmarz' OR (bitand(s.perm_creator, 2)
= 2) OR (bitand(s.perm_default, 2) = 2) OR ( u.user_uid = 'rmarz' AND
(bitand(u.perm, 2) = 2)) ORDER BY s.attribute_name ASC [pid 7571 on
line 469 of "/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
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
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
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 ("select") to the database.
"dwo/dbrmz.robbienet.local" is my connect string (server/databaseServcieName)
log, can you try again and see if you see anything weird in the query
that could be causing this in Oracle?
Log the query
Bug: 9151http://cvs.horde.org/diff.php/framework/Share/Share/sql.php?rt=horde&r1=1.1.2.60&r2=1.1.2.61&ty=u
I neither have a file
/ansel/lib/Ansel.php
nor do I have
/framework/Share/lib/Horde/Share/Sql.php
Or am I wrong?
MFB: Set emulate_database option for Oracle (
Bug #9151).http://git.horde.org/diff.php/ansel/lib/Ansel.php?rt=horde-git&r1=d934dfda17564153b68ab78ccbd04828b95f2546&r2=0e2e0fae606be0700dbd617d488a06755a806f8d
http://git.horde.org/diff.php/framework/Share/lib/Horde/Share/Sql.php?rt=horde-git&r1=df95b1257ff0201b44aec092cdd4d70018beb14f&r2=0e2e0fae606be0700dbd617d488a06755a806f8d
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
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
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
"/home/horde/horde-webmail-1.2.6/kronolith/lib/Kronolith.php"]
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
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
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 "/home/horde/horde-webmail-1.2.6/nag/lib/Nag.php"]
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
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
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
"/home/horde/horde-webmail-1.2.6/kronolith/lib/Kronolith.php"]
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
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
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 "/home/horde/horde-webmail-1.2.6/nag/lib/Nag.php"]
Set emulate_database option for Oracle (
Bug #9151).http://cvs.horde.org/diff.php/ansel/lib/Ansel.php?rt=horde&r1=1.517.2.81&r2=1.517.2.82&ty=u
http://cvs.horde.org/diff.php/framework/Auth/Auth/Signup/Attic/sql.php?rt=horde&r1=1.3.2.5&r2=1.3.2.6&ty=u
Use PEAR DB's limitQuery() method, don't hard code mysql-specific
LIMIT syntax.
Bug: 9151http://cvs.horde.org/diff.php/imp/lib/Sentmail/sql.php?rt=horde&r1=1.12.2.2&r2=1.12.2.3&ty=u
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
"/home/horde/horde-webmail-1.2.6/kronolith/lib/Kronolith.php"]
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
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
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 = 'rmarz' AND sentm
ail_success = 1 AND sentmail_action in ('new', 'forward', 'reply',
'redirect') 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
"/home/horde/horde-webmail-1.2.6/imp/lib/Sentmail/sql.php"]
it is the "LIMIT 10" at the end.
What should that do? Limit the resultset to 10 rows?
"where rownum <10" would do that
I would use no restriction at all and fetch only the first 10 rows...
MFB, don't use 'AS' in table aliases.
Some of the changes from CVS were already present in Git, this is the
remaining changes.
Bug: 9151http://git.horde.org/diff.php/framework/Share/lib/Horde/Share/Sql/Hierarchical.php?rt=horde-git&r1=df95b1257ff0201b44aec092cdd4d70018beb14f&r2=7ebcfde1f90ad9c41d603ada10c1ef51567852e5
Don't use "AS" for table aliases.
Bug: 9151http://cvs.horde.org/diff.php/framework/Share/Share/sql.php?rt=horde&r1=1.1.2.59&r2=1.1.2.60&ty=u
http://cvs.horde.org/diff.php/framework/Share/Share/sql_hierarchical.php?rt=horde&r1=1.17.2.28&r2=1.17.2.29&ty=u
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
"/home/horde/horde-webmail-1.2.6/lib/Horde/Share/sql.php"]
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 = 'rmarz' OR (bitand(s.per
m_creator, 4) = 4) OR (bitand(s.perm_default, 4) = 4) OR ( u.user_uid
= 'rmarz' 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 "AS" between table-name and alias in the
outer-joined table.
In this rare case, Oracle follows hard the sql99-Standard, which says,
that "as" is allowed for column aliases and does not mention it for
table-aliases.
Assigned to Jan Schneider
Disable emulate_database for MDB2/Oracle (
Bug #9151).http://cvs.horde.org/diff.php/framework/Share/Share/sql.php?rt=horde&r1=1.1.2.58&r2=1.1.2.59&ty=u
There is a function:
function getInstance($dsn = array())
{
// Merge local options with Horde database config.
if (isset($GLOBALS['conf']['sql'])) {
$dsn = array_merge($GLOBALS['conf']['sql'], $dsn);
}
unset($dsn['charset']);
$options = array('seqcol_name' => 'id',
'portability' => MDB2_PORTABILITY_ALL &
~MDB2_PORTABILITY_FIX_CASE,
'force_defaults' => false,
'emulate_database' => false);
^^^^^^^^^^^^^^^^^^
This is for sure not the right place for doing so, since it affects
the other db-drivers, too...
I'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
assigned the database name. Where and how did you set it when you
tried that?
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
...
Queue ⇒ Horde Framework Packages
Summary ⇒ Kronolith, Nag, Mnemo, Turba don't work with Oracle DB
State ⇒ Feedback
Priority ⇒ 2. Medium
preferences works fine? Those don'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.
Priority ⇒ 3. High
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Groupware Webmail Edition
Type ⇒ Bug
Summary ⇒ Kronolith, Nag, Mnemo, turba wont work with Oracle DB
adress, notes and tasks Apllications to the Database fail.
The Error shown in the Web is: "MDB2 Error: not found"
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
"/home/horde/horde-webmail-1.2.6/turba/lib/Turba.php"]
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] => oci8
[dbsyntax] => oci8
[username] => horde
[password] => HORDE
[protocol] =>
[hostspec] =>
[port] =>
[socket] =>
[database] => dwo/dbrmz.robbienet.local
[mode] =>
[persistent] =>
)
This is, how it should be (right at the start in the MDB2.php File)
And this is, what's passed to the oci8.php for the connection:
dsn: Array
(
[phptype] => oci8
[dbsyntax] => oci8
[username] => dwo/dbrmz.robbienet.local
[password] => HORDE
[protocol] =>
[hostspec] =>
[port] =>
[socket] =>
[database] => dwo/dbrmz.robbienet.local
[mode] =>
[persistent] =>
)
The username is now the connect-string.
Somewhere in the Web I found the hint, that one should set the
'emulate_database' 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.