LDAP Class for PHP

Installation

  • Download

    Extract the gzip file and grab ldap.inc. This is the only file required.

    Since it is just a single include file, all you need to do is put it in your PHP include directory. You can put it anywhere you want, as long as it can be included from your PHP script. It should NOT be put underneath your web directory since the include file will contain your bind DN and bind password.

    Configuration

    Configuration is almost as easy as the Installation. You need to modify the FIVE defines at the top of the ldap.inc file. These defines set the default hostname, basedn, binddn, bindpw, and the path to the slapd.oc.conf file. If you don't change these values.. it probably won't work right.