Page 1 of 1

LDAP maximum results

Posted: Mon Jul 08, 2002 9:58 am
by cwcollins
hi all,

i am currently working on several application that use information from MS Active Directory (an LDAP Server). i have ut doing a bunch of cool stuff, but i am having troubls with one thing... i can't get it to return more than 1000 results. i'm can't find a place within the PHP configuration that will allow me to set the maximum number of results, but maybe i'm missing something. If anyone have any experience or advice on this, i'd be in your debt.

thanks.

-c.w.collins

Posted: Mon Jul 08, 2002 10:10 am
by llimllib
Well, I don't know much about LDAP or MS active Directory, but here's how I'd start debugging: Find an alternate place to query the dbase from. Run your large query from there (a command-line interface would be ideal) and see how many results it returns. This will tell you if the limitation is in the DB or PHP. What you do next depends heavily on where the problem is - let me know if you can find this info out.

Posted: Mon Jul 08, 2002 10:19 am
by cwcollins
did that already. MS provides several tools for viewing this data, and these return all of the records.

the ldap_search() function allows a maximum to be set, but this will not effect the server if it is configured to return only a set number. i guess it must be an AD configuration thing.

-c.w.collins

Posted: Mon Jul 08, 2002 10:31 am
by llimllib
the php manual says:
NOTE: This parameter can NOT override server-side preset sizelimit. You can set it lower though.
I'll guess you already read this from your last comment - can you find the server-side preset sizelimit? I looked too, and didn't find a limit in php.ini, but it certainly could be something in there.

Posted: Mon Jul 08, 2002 10:33 am
by cwcollins
i've already been through the .ini, and can't find it... thanks anyway.

-c.w.collins

Posted: Mon Jul 08, 2002 10:36 am
by llimllib
no prob...good luck finding the limit

Posted: Mon Jul 08, 2002 12:58 pm
by 9902468
I had problem like yours, and it might not have anything to do with php. The Novell server I was querying returned less objects than it should have, but this was configured in the Novell server. (Not to give over x results to anonymous searches) So it was fixed by changing that limit. (I'm not that good with ldap, so I don't know if this is the case, but check it out...)

If you get different results from command line, remember to check how your ldap cmd tool is configured, as it can log automatically to ldap server. (And thus be treated differently...) Also some tools may have different rights than anonymous query... Anyhow, happy hunting ;)

Posted: Mon Jul 08, 2002 1:52 pm
by cwcollins
i am actually runinng an authenticated query, but i have asked my systems guy to look into it! thanks alot, guys.

c.w.collins