Fresh Install

LDAP Integration module requires the ldap module for php which may not be installed/enabled by default. To install these:

On Debian/Ubuntu
$ sudo apt-get install php5-ldap

On Windows
editing the php.ini file to uncomment the line
extension=php_ldap.dll;
should do the trick.

After restarting apache/php install the module following the Drupal contributed module installation guide.

6.x Upgrades
Replace the existing code with the new code in your system.

Log on as the admin user (uid=1)

Follow the standard procedures to run update.php ( http://drupal.org/upgrade/running-update-php )

Older unsupported version info

Between 4.7 and 5.x versions of the module, the module's backend was overhauled and it also was being transferred to new maintainers. As such, upgrading the module from previous versions to 5.x will include a complete uninstallation of the old version and re-installation of the new version. Also, ldap configuration information will have to be re-entered.

  1. uninstall the old module
  2. remove the module entry from the system table
    • This sql query:
      SELECT name FROM system

      should show you all of the modules that were in installed (active or inactive). You should see entries for ldapauth, ldapgroups or ldap_integration.

    • Delete those entries. For e.g.
      DELETE FROM system WHERE name = 'ldapauth'
  3. Install the new version module following the drupal 5.x module installation guide. It will create the table and the new module.

Comments

christian_M’s picture

This might sound obvious but it was not to me!

This module relies, of course, on the PHP-LDAP library. Make sure it is installed on your server.
Saves a lot of hair-pulling.

tryitonce’s picture

This might sound obvious ...

Thanks for the advice - could you just add the details / link of the module(s) you are referring to. This would help as running a search for "PHP-LDAP library" or just "PHP-LDAP" is not providing the answer.

But its great not to have to figure it all out on your own!!!!!!

M_Saltmarsh’s picture

# installed
sudo apt-get-get intall php5-ldap

# check module list
apache2ctl -M

# did not find ldap_module so run
sudo a2enmod ldap

# check module list again and found ldap_module
apache2ctl -M

run phpinfo() in browser and found Ldap section after Json.

Now on to adding new ldap_integration-6.x-1.0-alpha2 package and see if it wires up!

magoo’s picture

2 things are mixed here: apache module and php ldap.

The first enables the use of LDAP with apache and the second for php.

AFAIK, there is no need to enable apache's ldap support in order to make drupal's module work.

so to enable php ldap, install the corresponding packages from your distribution (if not already installed: check with phpinfo()) and you may need to reload the apache server (not sure if required).

grincon’s picture

I had the extension in my ext PHP folder but I had to add the

extension=php_ldap.dll;

to the php.ini file to get it to load. Other than that I used the very basic configuration and it worked just fine on an Active Directory configuration.

Some settings that worked for me where I had some doubt:

LDAP-Server: ldap://myldapserver
Base DNs: ou=Users,ou=Admin,dc=mydomain,dc=com
DN for non-anonymous search: myusername
password: mypassword

Hope it helps.

+German

Ubuntu_Warrior’s picture

Is it just my install or is this module extremely slow? I seemed to auth fine off our OpenLDAP server (hosting about 250 business users) it just took a long time to do and gave me limited options on the menu. I am also getting the following error when trying to access the My Account menu option:

warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/www/drupal-6.9/sites/all/modules/ldap_integration/ldapdata.module on line 355.

We have been using Drupal for many years now but LDAP support is a deal-breaker for us as we cannot administer our user base on Samba/OpenLDAP and Drupal.

Any advice/help on this?

eriktoyra’s picture

Yes, the module is dead slow even with a small amount of users. Since it tries to synch LDAP and Drupal every time a user object is loaded (which happens on almost every page load) it casues a lot of unnecessary queries to both LDAP and the database. However, there is a patch available to fix so that synchronization is only done when updating a user or when the user is logging in. You can find the patch here: http://drupal.org/node/305425#comment-1039898.

Using this patch I have reduced the page load time to 10 - 20%.

jon.barker’s picture

Has anyone got a walk through guide to getting LDAP Library working with Drupal?

cehailey’s picture

I have the module installed and configured, added the server which has 1 user entry that works with ldapsearch. I have the same base info, etc set in the module, it is able to connect to ldap (the password test). The problem is that I get no indication that anything is happening, I cannot login with that user, it does not show up in the admin users page and I do not see any diagnostics anywhere. I don't know if it's barfing or if the search if failing. The only indication that I get that it is working at all is if I limit authentication to ldap all users are broken.

Any ideas on where to start. I suspect that the query is not correct. BTW I used migration tools to create the ldif record for the ldap database. I assume I can add additional users from Drupal admin.