Author Topic: ldap version?  (Read 5787 times)

Offline jay

  • Jr. Member
  • **
  • Posts: 10
ldap version?
« on: August 16, 2007, 12:25:15 PM »
what version of ldap is supported? LDAP v2 and/or LDAP v3?

I'm trying to integrate the scheduleworld ldap-server but till now without any success. I got following errors:
- PHP Notice: Bind failed for dn=uid=54198,dc=scheduleworld,dc=com
- PHP Warning: ldap_list() [function.ldap-list]: Search: Insufficient access

is this a problem of the ldap version? or any other ideas whats wrong?

thanks
jan

Offline jay

  • Jr. Member
  • **
  • Posts: 10
Re: ldap version?
« Reply #1 on: August 19, 2007, 07:06:04 PM »
after a while I found the solution!

first of all: roundcube supports LDAP v2 and v3!

I think it's a bug in the 0.1-RC1 release, because you have to change the follwing line in file \program\include\rcube_ldap.inc:
ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['port']);
to
ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, 3);

or if you add in file main.inc.php in the section of ldap configuration following attribut:
'version'    => 3, // added for ldap version
you have to change the line in rcube_ldap.inc to
ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['version']);

is this a known bug in release 0.1-RC1?
jan

Offline wormie_dk

  • Newbie
  • *
  • Posts: 4
Re: ldap version?
« Reply #2 on: November 08, 2007, 07:20:11 AM »
It seems the new version (rc2) has ldap_version support. However it doesnt work... Are the theese settings correct? (Scope/filter)?

$rcmail_config['ldap_public']['ScheduleWorld'] = array(
'name' => 'ScheduleWorld',
'hosts' => array('ldap.scheduleworld.com'),
'port' => 389,
'base_dn' => 'uid=42671,dc=scheduleworld,dc=com',
'bind_dn' => 'uid=42671,dc=scheduleworld,dc=com',
'bind_pass' => '***',
'search_fields' => array('mail', 'cn'), // fields to search in
'name_field' => 'cn', // this field represents the contact's name
'email_field' => 'mail', // this field represents the contact's e-mail
'scope' => 'sub', // search mode: sub|base|list
'filter' => 'objectClass=*', // will be &'d with search field ex: (status=act)
'ldap_version' => 3,
'fuzzy_search' => true); // server allows wildcard search

I am not sure how it is supposed to work but when I go to addressbook and select "scheduleworld" nothing appears (no error either) If I then enter something into search and press enter nothing appears. The same applies if enabling the example ldap host... How is it supposed to work?

Offline wormie_dk

  • Newbie
  • *
  • Posts: 4
Re: ldap version?
« Reply #3 on: November 15, 2007, 04:15:37 AM »
Apparently php is not compiled with ldap support at my provider (site5)... Does anyone know if it is possible to add LDAP support somehow?

Offline jay

  • Jr. Member
  • **
  • Posts: 10
Re: ldap version?
« Reply #4 on: November 15, 2007, 04:37:12 AM »
It was not easy to integrat scheduleworld ldap server. I had to mad some changes in the code of roundcube. I can send you these in two weeks (next week I'm on holiday). But before you have to be sure if your php installation support ldap or not (you should see this in the log files of roundcube and/or webserver). Let me know.

Offline pasqu

  • Newbie
  • *
  • Posts: 1
ldap version?
« Reply #5 on: November 17, 2008, 04:15:25 AM »
Is anyone that have scheduleworld connected via ldap correctly? And can post his config?

I have tryed but without success...