6.0.0-beta1
7/4/25

[#6789] Search problem for ldap backend
Summary Search problem for ldap backend
Queue Turba
Queue Version 2.2
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester david (at) tmv (dot) gov (dot) tw
Created 05/30/2008 (6244 days ago)
Due
Updated 06/02/2008 (6241 days ago)
Assigned 05/31/2008 (6243 days ago)
Resolved 06/02/2008 (6241 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/02/2008 10:09:18 AM Jan Schneider State ⇒ Not A Bug
 
06/02/2008 03:58:01 AM david (at) tmv (dot) gov (dot) tw Comment #5 Reply to this comment

[Show Quoted Text - 10 lines]
Hello jan,

I found that is because of maillocaladdress has no equality rule on it.

The original misc.schema for maillocaladdress:

attributetype ( 2.16.840.1.113730.3.1.13

         NAME 'mailLocalAddress'

         DESC 'RFC822 email address of this recipient'

         EQUALITY caseIgnoreIA5Match

         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )



I add line  " SUBSTR caseIgnoreSubstringsMatch" to it ,and fixed.



Thank you,jan.



david
06/01/2008 10:02:49 AM Jan Schneider Comment #4 Reply to this comment
Jun 01 07:50:58 HORDE [debug] [turba] LDAP query by
Turba_Driver_ldap::_search(): user = txg16, root =
ou=people,dc=mks,dc=example (ldap.tmv.gov.tw); filter =
"(&(maillocaladdress=*david*))"; attributes = "dn, uid, cn,
maillocaladdress, roomnumber, homephone, telephonenumber, mobile,
homepostaladdress, sn"; deref = "0"  ; sizelimit = 1200 [pid 9584 on
line 186 of "/usr/local/apache/horde-rc/turba/lib/Driver/ldap.php"]
And does this ldap query work in your directory? Looks perfectly fine 
to me? Does it return results when running directly in ldap?
05/31/2008 11:58:38 PM david (at) tmv (dot) gov (dot) tw Comment #3 Reply to this comment
Can you turn on debug logs and post the ldap searches?
Jun 01 07:50:58 HORDE [debug] [horde] Connected to the following 
memcache servers:localhost:11211 [pid 9584 on line 123 of 
"/usr/local/apache/horde-rc/lib/Horde/Memcache.php"]

Jun 01 07:50:58 HORDE [debug] [horde] Read session data (id = 
ed91f06d0fcf80d621d73cbbabfeeb37) [pid 9584 on line 171 of 
"/usr/local/apache/horde-rc/lib/Horde/SessionHandler/memcache.php"]

Jun 01 07:50:58 HORDE [debug] [turba] Hook _horde_hook_share_init in 
application horde not called. [pid 9584 on line 1629 of 
"/usr/local/apache/horde-rc/lib/Horde.php"]

Jun 01 07:50:58 HORDE [debug] [turba] LDAP query by 
Turba_Driver_ldap::_search(): user = txg16, root = 
ou=people,dc=mks,dc=example (ldap.tmv.gov.tw); filter = 
"(&(maillocaladdress=*david*))"; attributes = "dn, uid, cn, 
maillocaladdress, roomnumber, homephone, telephonenumber, mobile, 
homepostaladdress, sn"; deref = "0"  ; sizelimit = 1200 [pid 9584 on 
line 186 of "/usr/local/apache/horde-rc/turba/lib/Driver/ldap.php"]

Jun 01 07:50:58 HORDE [debug] [turba] SQL query by 
Horde_Alarm_sql::_list(): SELECT alarm_id, alarm_uid, alarm_start, 
alarm_end, alarm_methods, alarm_params, alarm_title, alarm_text, 
alarm_snooze, alarm_internal FROM horde_alarms WHERE alarm_dismissed = 
0 AND ((alarm_snooze IS NULL AND alarm_start <= ?) OR alarm_snooze <= 
?) AND (alarm_end IS NULL OR alarm_end >= ?) AND (alarm_uid = ? OR 
alarm_uid = ?) ORDER BY alarm_start, alarm_end [pid 9584 on line 148 
of "/usr/local/apache/horde-rc/lib/Horde/Alarm/sql.php"]

Jun 01 07:50:58 HORDE [debug] [turba] SQL query by 
Turba_Driver_sql::_search(): SELECT object_id, object_type, owner_id, 
object_nameprefix, object_firstname, object_middlenames, 
object_lastname, object_namesuffix FROM turba_objects WHERE 
(object_type = ? AND owner_id = ?) [pid 9584 on line 166 of 
"/usr/local/apache/horde-rc/turba/lib/Driver/sql.php"]

Jun 01 07:50:58 HORDE [debug] [turba] SQL query by 
Turba_Driver_sql::_search(): SELECT object_id, object_type, owner_id, 
object_nameprefix, object_firstname, object_middlenames, 
object_lastname, object_namesuffix FROM turba_objects WHERE 
(object_type = ? AND owner_id = ?) [pid 9584 on line 166 of 
"/usr/local/apache/horde-rc/turba/lib/Driver/sql.php"]

Jun 01 07:50:58 HORDE [debug] [turba] Max memory usage: 1835008 bytes 
[pid 9584 on line 339 of 
"/usr/local/apache/horde-rc/lib/Horde/Registry.php"]

Jun 01 07:50:58 HORDE [debug] [turba] Wrote session data (id = 
ed91f06d0fcf80d621d73cbbabfeeb37) [pid 9584 on line 219 of 
"/usr/local/apache/horde-rc/lib/Horde/SessionHandler/memcache.php"]
05/31/2008 02:11:02 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Can you turn on debug logs and post the ldap searches?
05/30/2008 01:28:02 AM david (at) tmv (dot) gov (dot) tw Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Search problem for ldap backend
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I have a problem while search email field for ldap backend,and alway 
empty result return.

Search on other field for this ldap backend work good.



http://www.david.tmv.gov.tw/tmp/search_by_name.gif

http://www.david.tmv.gov.tw/tmp/search_by_email.gif



Partial sources.php for turba

      'search' => array(

          'name',

          'email',

          'homePhone',

          'workPhone',

          'cellPhone',

          'homeAddress',

          'unit',

          'id'

      ),

      'strict' => array(

          'dn',

      ),

      'approximate' => array(

          'cn',

      ),


Saved Queries