Originally written by Scott Barnett and Richard Hyland. Adopted by the community.
Working with Active Directory doesn't need to be hard. Adldap2 is a tested PHP package that provides LDAP authentication and Active Directory management tools using the Active Record pattern.
- Installation
- Testing With A Public AD Server
- Usage
- Configuration
- Getting Started
- Searching
- Models
- Working with Distinguished Names
- API Documentation
- Classes
- Implementations
To use Adldap2, your sever must support:
- PHP 5.4.26 or greater
- PHP LDAP Extension
Note: Adldap makes use of
ldap_modify_batch()
for processing modifications to models. Your server must be on PHP >= 5.4.26 || >= 5.5.10 || >= 5.6.0 to make modifications.
If your AD server requires SSL, your server must support the following libraries:
- PHP SSL Libraries (http://php.net/openssl)
Adldap2 has moved to a composer based installation. If you'd like to use Adldap without an auto-loader, you'll
have to require the files inside the project src/
directory yourself.
Insert Adldap into your composer.json
file:
"adldap2/adldap2": "5.2.*"
Run composer update
You're good to go!
Adldap2 is versioned under the Semantic Versioning guidelines as much as possible.
Releases will be numbered with the following format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
- Breaking backward compatibility bumps the major and resets the minor and patch.
- New additions without breaking backward compatibility bumps the minor and resets the patch.
- Bug fixes and misc changes bumps the patch.
Minor versions are not maintained individually, and you're encouraged to upgrade through to the next minor version.
Major versions are maintained individually through separate branches.
If you need to test something with access to an LDAP server, the generous folks at Georgia Tech have you covered.
Use the following configuration:
$config = [
'account_suffix' => '@gatech.edu',
'domain_controllers' => ['whitepages.gatech.edu'],
'base_dn' => 'dc=whitepages,dc=gatech,dc=edu',
'admin_username' => '',
'admin_password' => '',
];
$ad = new \Adldap\Adldap($config);
However while useful for basic testing, the queryable data only includes user data, so if you're looking for testing with any other information or functionality such as modification, you'll have to use you're own server.