6.0.0-beta1
7/6/25

[#11452] content of 'turba_objects' -> 'object_member' yields to error
Summary content of 'turba_objects' -> 'object_member' yields to error
Queue Turba
Queue Version 3.0.15
Type Bug
State Not A Bug
Priority 2. Medium
Owners
Requester piper (at) hrz (dot) uni-marburg (dot) de
Created 09/28/2012 (4664 days ago)
Due 09/29/2012 (4663 days ago)
Updated 10/17/2012 (4645 days ago)
Assigned 10/12/2012 (4650 days ago)
Resolved 10/16/2012 (4646 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/17/2012 07:31:22 AM piper (at) hrz (dot) uni-marburg (dot) de Comment #5 Reply to this comment
Thanks for this explanation.
My migration somehow slipped this change (the table 'turba_objects' 
existed already in the horde-3-myslq-DB with 'object_members' of type 
'blob').
I will now check all DB-fields for correct type.
10/16/2012 03:19:09 PM Jan Schneider Comment #4
State ⇒ Not A Bug
Reply to this comment
I am using postgresql as db-backend, the type of 'object_member' is 'bytea'.
This is the problem. It's not supposed to be bytea, if created through 
Horde's migration scripts, this field is of type "text.
10/15/2012 09:07:41 AM piper (at) hrz (dot) uni-marburg (dot) de Comment #3 Reply to this comment
The problem seems to be located in turba/lib/Driver/Sql.php, the 
search-function there does not recognize the '__members'-value 
returned from postgresql as blob and therefore does not use 
'binaryToString()' on it.

I found a workaround by setting the turba-attribute 'type' => 'image' 
for '__members' in turba/attributes.local.php, this forces the use of 
'binaryToString' on the '__members'-value, which is then recognized 
and used correctly. This solution works for my setup with postgresql 
as only source of contact-lists, but will not work if contact lists 
come from other sources too, e.g. LDAP.

I assume, the correct solution has to be somewhere in the 
postgresql-driver when handling bytea-values, but I do not know enough 
of php for finding it.

Andreas
10/12/2012 01:31:16 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
Cannot reproduce. Can you provide a backtrace?
09/28/2012 10:57:09 AM piper (at) hrz (dot) uni-marburg (dot) de Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ content of 'turba_objects' -> 'object_member' yields to error
Due ⇒ 09/29/2012
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I get the following error message in the system log if the field 
'object_member'  in table 'turba_objects' is not NULL

HORDE [turba] PHP ERROR: strlen() expects parameter 1 to be string, 
resource given [pid 10010 on line 470 of 
"/var/www/horde/turba/lib/Driver.php"]

The corresponding setting in turba/config/backends.local.php is the default:
  $cfgSources['localsql'] = array(
    'map' => array(
         '__members' => 'object_members',
))

If I comment out this setting, the error message disappears.

I am using postgresql as db-backend, the type of 'object_member' is 'bytea'.

Thanks for any help on this.

Andreas

Saved Queries