K
K
Koal Koalich2018-09-20 17:08:57
PHP
Koal Koalich, 2018-09-20 17:08:57

How to recursively traverse LDAP directories in php with 1000 entry limit when returning?

As you know, by default, AD returns only 1000 records when searching . This can be bypassed, but is highly discouraged .
I have a bunch of 10-year-old code tied to php 5.3, and php 5.4 introduced the ability to paginate when using the LDAP protocol version 3. The problem is that there is a lot of this code and it is old and you can’t just switch to 5.4. Already tried. In fact, it is possible to take more than 1000 records in a loop even in version php 5.3 (playing with the $filter parameter in php.net/manual/en/function.ldap-search.php), but to be sure that I "took" everything, you need to at least know the number of entries in each directory. And even php.net/manual/ru/function.ldap-count-entries.php won't help.
Maybe someone came across?
ps I had a similar question https://toster.ru/q/563901, but there was Kerio, and here - AD.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-09-20
@dimonchik2013

so what is the complexity of (if < 1000, break) ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question