Net_LDAP2
pear.php.net
Net_LDAP
Object oriented interface for searching and manipulating LDAP-entries
Net_LDAP2 is the successor of Net_LDAP which is a clone of Perls Net::LDAP object interface to directory servers. It does contain most of Net::LDAPs features but has some own too. With Net_LDAP2 you have: * A simple object-oriented interface to connections, searches entries and filters. * Support for TLS and LDAP v3. * Simple modification, deletion and creation of LDAP entries. * Support for schema handling.

Net_LDAP2 layers itself on top of PHP's existing ldap extensions.
Benedikt Hallinger
beni
beni@php.net yes
2023-10-12
2.3.0
2.2.0
stable
stable
LGPLv3 License
* Support PHP 8.1 * Fix unit tests on PHP 8.0.29 * Make tests compatible with PHPUnit 9
7.4
1.10.1
ldap
0.1
0.1
beta
beta
2003-06-23
LGPL License
Initial release
0.2
0.2
beta
beta
2003-08-23
LGPL License
Fixed a lot of bugs that jumped in during the pearification process
0.3
0.3
beta
beta
2003-09-21
LGPL License
More bug squashing! Much better errorhandling in the ->search() function. Also, all errors that create a Pear_error now includes the errornumber if appropriate (i.e. it was an ldap generated error).
0.4
0.4
beta
beta
2003-10-01
LGPL License
Many more bugfixes. Jan Wagner fixed the shift_entry function. Also a new Net_LDAP_Entry::modify function has been added that goes far making a simple way to modify entries.
0.5
0.5
beta
beta
2003-10-11
LGPL License
Jan Wagner Contributed a new RootDSE object and a Schema object and some fixes to the Net_LDAP::search() method The new Net_ldap_entry::modify() method seems to work very nice now.
0.6
0.6
beta
beta
2003-10-17
LGPL License
New Net_LDAP::ArrayUTF8Decode and Net_LDAP::ArrayUTF8Encode functions. These are used by the Net_LDAP::Entry objects to ensure that things work ok.
0.6.3
0.6.3
beta
beta
2003-11-12
LGPL License
It seems that 0.6.2 was out too fast. So this is mainly a bugfix release: - Removed remaining Net_LDAP::UTF8Encode and Net_LDAP::UTF8Decode calls in Net_LDAP_Entry, which stopped attributes() and get_entry() from working - The UTF8 functions somehow got outside the Net_LDAP class ... FIXED. - The usuage example of the last release was wrong. We decided to move UTF8 handling into Net_LDAP. Handling should be done this way:

$attr = $ldap->utf8Encode($attr); $entry->modify($attr); $attr = $ldap->utf8Decode( $entry->attributes() ); - This means Net_LDAP_Util is useless right now, but will be extended in the future. - Jan did a complete overhaul of the phpdoc stuff. Everything seems to be fine now with phpDocumentor.
2007-02-05
0.7.0
0.7.0
beta
beta
LGPL License
This long awaited release of Net_LDAP features more stability and new functionality. The main changes are: - Rewrite of much of the code (including some api changes!) - LOTS of fixed bugs! - New class for easy filter handling (Net_LDAP_Filter) - Sorting support for searchresults (including multivalued sorting!) - Searched Entries can now be fetched as_struct() (array)! - Some memory optimizations

Please note also that Net_LDAPs configuration changed slightly. Please see $_config in LDAP.php for the new parameters.
2007-02-23
0.7.1
0.7.0
beta
beta
LGPL License
This is not just a bugfix release of 0.7.0 but also introduces some internal optimisations: - Fixed a connection bug whith LDAP V3 only servers - clearer sanitizing of the host config parameter
2007-05-07
0.7.2
0.7.2
beta
beta
LGPL License
This release features some internal code movements to be more compatible to PERL::Net_LDAP. The movements include: * Removed UTF8 en-/decoding stuff from Net_LDAP_Utils class since this was moved to Net_LDAP class in 0.6.6 * Moved Filter encoding from Net_LDAP_Filter to Net_LDAP_Util * Moved ldap_explode_dn_escaped() from Net_LDAP_Entry to Net_LDAP_Util * Added perls functions from Net_LDAP::Util to our Util class, but they still need some work Please note that ldap_explode_dn_escaped() is not available from Net_LDAP_Entry anymore.

Additionally some new functionality has been introduced: * You can now apply regular expressions directly to a entrys attributes and don't need to fetch the attribute values manually. * Net_LDAP_Schema can check if a attributes syntax is binary

The following bugs have been resolved: * Connections to LDAP servers that forbid anonymous binds are possible again * The JPEG attribute is now properly returned as binary value instead of string * If the array describing selected attributes in searches didn't contain consecutive keys, there was a problem sometimes * Some PHP5 return issues
2007-06-12
0.7.3
0.7.2
beta
beta
LGPL License
This release introduces some example files showing you in detail how to work with Net_LDAP. Additionally, a bug at recursive deletion of an entry is fixed and the Net_LDAP_Filter class is slightly optimized.
2007-06-20
1.0.0RC1
1.0.0RC1
beta
beta
LGPL License
Again some small Bugfixes, most notably a bug within $ldap->modify() that occured when using the combined 'changes' array. Besides that, $search->popEntry() and the corresponding alias pop_entry() has been implemented. Net_LDAP_Util::unescape_filter_value() is available too now and Net_LDAP_Util::escape_filter_value() can handle ASCII chars smaller than 32. Above that, Net_LDAP_Util::canonical_dn() has been fully implemented. A new method createFresh() was added to Net_LDAP_Entry, so creation of initial entries is more standardized and clearer. A new example is available, describing the $ldap->modify() method. The add_entry.php example was updated, it shows the use of Net_LDAP_Entry::createFresh(). $ldap->add() links unlinked entries now to the connection used for the add. Some new additional utility functions are available in Net_LDAP_Util to assist you in handling attributes and dns. The LDAP-Rename command now uses this functions to deal with DN escaping issues. Please note that ldap_explode_dn_escaped() is not available from Net_LDAP_Util anymore; it got superseeded by Net_LDAP_Util::ldap_explode_dn().
2007-06-28
1.0.0RC2
1.0.0RC2
beta
beta
LGPL License
Net_LDAP->dnExists() uses the Util class now, which makes it safer. A new move() method is available from Net_LDAP. Please note, that the copy() method was removed from the Net_LDAP_Entry class since people would expect attribute moving because of the overall API of Net_LDAP. Instead use the more failsafer copy() from Net_LDAP.
2007-07-24
1.0.0RC3
1.0.0RC3
beta
beta
LGPL License
Fixed a bug with dnExists() that was caused mainly by bad behavior of Net_LDAP_UTIL::ldap_explode_dn(). Fixed a bug with call time pass-by-reference if calling $entry->update(); however this inflicted a API change: The parameter $ldap is not available anymore, you need to use $entry->setLDAP() prior update now if you want to change the LDAP object. This brought us a more logical API now, since Entry operations should be performed by the Net_LDAP object.
2007-09-18
1.0.0RC4
1.0.0RC4
beta
beta
LGPL License
- Fixed some minor bugs of RC3 - Reintroduced $ldap parameter for $entry-<update(), but it is not prefferred to use this way. The Parameter is there for perl interface compatibility
2007-10-29
1.0.0
1.0.0
stable
stable
LGPL License
After more than four years of development, we are very proud to announce the ~ FIRST STABLE Net_LDAP RELEASE 1.0.0 ~ Net_LDAP ist tested now and should be stable enough for production use. The API is finished so far, no changes should be neccessary in the future.

Changes to Release candidate 4: - Implemented PHPUnit tests - Fixed some minor bugs of RC4 (including the schema loading warning-generation) - Fixed several bugs in Net_LDAP_Util - Improved Net_LDAP_Filter and Net_LDAP_Util error handling and code cleanness - Completely implemented Net_LDAP_Filter perl interface - Improved several doc comments and fixed some spelling errors
2008-01-14
1.1.0a1
1.1.0a1
beta
beta
LGPL License
* Added LDIF reading and writing support * Fixed minor issues of 1.0.0 release
2008-01-21
1.1.0a2
1.1.0a2
beta
beta
LGPL License
* Added parseLines() to Net_LDAP_LDIF for more convinience * Added some handy methods to Net_LDAP_Entry * Enhanced tests
2008-02-27
1.1.0
1.1.0
stable
stable
LGPL License
* Fixed a little bug at cross directory move * Fixed a bug when deleting a subtree containing several subentries that failed if one called dnExists() prior calling delete() * Fixed some minor bugs at NeT_LDAP->move() and Net_LDAP->dnExists() * Added Net_LDAP tests * Changed API of Net_LDAP->copy() to only accept Net_LDAP_Entry objects, because with DNs Attribute values will be lost /!\ This is the last release of Net_LDAP supporting PHP4 /!\
2008-03-19
2.0.0RC1
2.0.0RC1
beta
beta
LGPL License
/!\ This release is PHP5 only, replacing the Net_LDAP package. If you still need PHP4 support, use Net_LDAP instead. * Implemented iterable search results so one can use foreach() with Net_LDAP2_Search objects * Fixed a problem with Net_LDAP2_LDIF and files with DOS line endings
2008-03-20
2.0.0RC2
2.0.0RC2
beta
beta
LGPL License
* Implemented PHP5 language stuff (thanks to Torsten Roehr for his helpful patches) * Changed Net_LDAP2->_markAsNew() to public access, since this is required by the api and may be useful to developers too * Changed API to create schema object, there is now a factory. Net_LDAP2->schema() calls that factory now instead of fetching the Schema itself * Changed API to create rootDSE object, there is now a factory. Net_LDAP2->rootDSE() calls that factory now instead of fetching the rootDSE itself * Net_LDAP2_Entry has a new factory constructor: createConnected() can be used to establish a new Net_LDAP2_Entry object that represents an already existing entry inside some directory
2008-06-04
2.0.0RC3
2.0.0RC3
beta
beta
LGPL License
* New constructor factory for Entry objects: createExisting() * Several small improvements * New method Entry->isNew() * Net_LDAP2->search() and Net_LDAP2->dnExists() can handle entry objects now * Added "present" matching rule as stated by RFC 2254 (is an alias of the former "any") * Bugfix in filter class for approx matching and not combination * Bugfix for Schema->isBinary() bug if unknown attribute type is requested
2008-10-16
2.0.0RC4
2.0.0RC4
beta
beta
LGPL License
* Net_LDAP2_Filter::create*() methods are declared static now * Net_LDAP2 is able to reconnect now in case link is down during operation (thanks Del) * Complex updates fail: under some circumstances, $entry->update() will fail. This is caused by mandatory attributes set and the internal behaviour of Net_LDAP2. A workaround is documented in the code and in the user manual. * Bugfixes in Dels patches. Soemtimes there where endless loops and deleting entries did not always succeed. * Bugfix to reset unicodePwd (Active Directory): a new $force parameter was introduced to Net_LDAP2_Entry->replace() that forces "replace" mode. If not set and attribute is empty (or could not be read like in the AD case) replace() resulted in Net_LDAP2 thinking it should add the attribute. This can now be overriden. * Bugfix in unit tests: the Net_LDAP2Test suite had huge memory consumtion caused by a little error in Net_LDAP2->checkLDAPExtension(). If that method is called before any Net_LDAP class was instanciated, a PEAR error is returned instead of the documented Net_LDAP2_Error which causes the unit test to plot out very much debug information.
2009-01-09
2.0.0RC5
2.0.0RC5
beta
beta
LGPL License
* Fixed a little issue with repetive adding the same attribute value * Fixed Bug #14886 that caused problems with OpenLDAP and V3 only connects * Fixed Bug #14903 and #15494, now bind attempt is also encrypted if TLS is requested * Fixed issue with repetitve adding or deleting values causing Net_LDAP to send the same change multiple times * Fixed Bug #15364 that caused a problem with setting the ldap version if only one version is supported by server
2009-05-08
2.0.0RC6
2.0.0RC6
beta
beta
LGPL License
* Bugfix in LDIF writer concerning needless base64 encoding of values * New schema caching facility * PHPCS fixes, some comment changes and general code cleanup
2009-05-28
2.0.0
2.0.0
stable
stable
LGPL License
* Fixed bug #16242 (arguments for createFresh in wrong order when calling Net_LDAP2_Entry::createFresh()) * Fixed bug #16253 (strict checking of isError())
2009-06-15
2.0.1
2.0.0
stable
stable
LGPL License
* Fixed Bugs #16272 and #16278 (Problem in starttls function)
2009-06-29
2.0.2
2.0.0
stable
stable
LGPL License
* Fixed some bugs that rendered the new schema caching facility unusable
2009-07-03
2.0.3
2.0.0
stable
stable
LGPL License
* Fixed LDAP RFC-1777 violation: bind has to be performed prior setting LDAP version * Fixed wrong version reported from version()
2009-07-08
2.0.4
2.0.0
stable
stable
LGPL License
* Fixed Bug #16404 (Bind fails at OpenLDAP with protocol error)
2009-07-14
2.0.5
2.0.0
stable
stable
LGPL License
* Fixed bug #16438 (SimplefileSchemaCache could not be configured due to wrong var name)
2009-08-04
2.0.6
2.0.0
stable
stable
LGPLv3 License
* switched LICENSE to LGPL v3 * added some documentation
2009-10-28
2.0.7
2.0.0
stable
stable
LGPLv3 License
* Corrected bug #16738 (Problem with Net_LDAP2_Filter::parse() with complex filter, when first subfilter was an combined filter too)
2.0.8
2.0.0
stable
stable
2010-02-12
LGPLv3 License
* Fixed Bug #16940 (Net_LDAP2::startTLS should ignore errors before ldap_start_tls() being called) * Fixed Bug #17023 (improper handling of wrapped lines in LDIF files)
2010-02-16
2.0.8
2.0.0
stable
stable
LGPLv3 License
* Fixed Bug #16940 (Net_LDAP2::startTLS should ignore errors before ldap_start_tls() being called) * Fixed Bug #17023 (improper handling of wrapped lines in LDIF files) * Fixed Bug #17057 (problem with parsing certain NOT-Filters)
2010-02-16
2.0.9
2.0.0
stable
stable
LGPLv3 License
* fixed package (package.xml was unclean so 2.0.8 wouldnt install)
2010-08-23
2.0.10
2.0.0
stable
stable
LGPLv3 License
* Added schema handling methods to make schema checks more easily accessible * Bugfix for #17245. The check in the code was not working properly. Schema checking is considered the users responsibility. If now an attribute is requested that is not set at the entry, an empty string is returned. * Bugfix for #17770. Some Net_LDAP2 files were included with relative path ("Util.php"), not absolute ("Net/LDAP2/Util.php"). * Bugfix for #17314. LDIF support for attributes with modifiers ("attr1;binary").
2011-01-19
2.0.11
2.0.0
stable
stable
LGPLv3 License
* (doc issue) Fix for #17861: Missing komma in example * Fix for #18202: Adding attributes to a Fresh Entry saving and laterly updating fails
2011-10-27
2.0.12
2.0.0
stable
stable
LGPLv3 License
* inmproved performance with large search results * Fixed some minor issues with Net_LDAP2_Filter and Net_LDAP2->dnExists() * Added NOT filter to Net_LDAP2_Filter::create() so negating is more easily now
2013-12-09
2.1.0
2.0.0
stable
stable
LGPLv3 License
* New feature: Filter::matches() can do simple filtering on entry sets (supported: equals, contain, begin, end, any; NOT, AND, OR. Filtering is simple based on regexp, no schema checks and matchRules yet!) * Fixed minor bugs in Filter, LDAP and Entry class * Util::split_attribute_string(): Added support for extended match operators from filters * Util::split_attribute_string(): Added support for delimeter retrieval
2015-10-30
2.2.0
2.2.0
stable
stable
LGPLv3 License
* Fix bug #20969: Fatal error with PEAR 1.10.0 / constructor visiblity * Add support for PHP 7 * Improve unit tests
2015-10-30
2.2.0
2.2.0
stable
stable
LGPLv3 License
* Fix bug #20969: Fatal error with PEAR 1.10.0 / constructor visiblity * Add support for PHP 7 * Improve unit tests
2023-02-23
2.2.1
2.2.0
stable
stable
LGPLv3 License
* Fix: remove unused $ber property