Bugs #2552: LDAP Addressbook doesn't sync - not a valid ldap link resource

Ticket modified by Richard Leopold at 2010/04/22 13:04
Tracking System: Bugs
Category: SyncML
Version: Version 1.6.003
Status: Open
Resolution: None
Completed: 0%
Priority: 5 - medium
Created By: Richard Leopold
Assigned to: Jörg Lehrke
Summary: #2552 - LDAP Addressbook doesn’t sync - not a valid ldap link resource
In summary:

PHP Warning: array_search() [function.array-search]: Wrong datatype for second argument in ./addressbook/inc/class.addressbook_bo.inc.php

ldap_search(): supplied argument is not a valid ldap link resource in ./addressbook/inc/class.addressbook_ldap.inc.php

take a look add the attached error.log!
Comment by Richard Leopold at 2010/04/22 13:04:
I got it …

in addressbook/inc/class.addressbook_ldap.inc.php line 250 …

the $GLOBALS[‘egw_info’][‘user’][‘passwd’] is set with the md5 encrypted password from the LDAP user entry “{MD5}…”, but we need the plaintext password to connect to the LDAP-server. So we need the plaintext-password out of the session …

Please check this …
Comment by Jörg Lehrke at 2010/04/22 10:28:
I installed EGw 1.6 with LDAP for accounts and addressbooks from scratch. I used the recommended schemas
evolutionperson.schema
mozillaAbPersonAlpha.schema
and it worked without any trouble.
Comment by Jörg Lehrke at 2010/04/22 07:41:
I’m not sure about the problem but what schemas do you use to store the addressbook in LDAP?
Comment by Richard Leopold at 2010/04/22 00:03:
I’m on revision 29936

The "Wrong datatype" error is fixed.
The additional error occurs furthermore:

PHP Warning: ldap_search(): supplied argument is not a valid ldap link resource in ./addressbook/inc/class.addressbook_ldap.inc.php on line 819
PHP Warning: ldap_errno(): supplied argument is not a valid ldap link resource in ./addressbook/inc/class.addressbook_ldap.inc.php on line 935
PHP Warning: ldap_error(): supplied argument is not a valid ldap link resource in ./addressbook/inc/class.addressbook_ldap.inc.php on line 981
PHP Warning: ldap_search(): supplied argument is not a valid ldap link resource in ./addressbook/inc/class.addressbook_ldap.inc.php on line 819

Comment by Jörg Lehrke at 2010/04/21 18:10:
I found the problem in addressbook_bo::search() and fixed the issue in SVN. Please update to the revision 29924 of the 1.6 branch and test again.

Linked entries:
http://www.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=2552&no_popup=1