LDAP maximum results

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
cwcollins
Forum Commoner
Posts: 79
Joined: Thu May 16, 2002 3:51 pm
Location: Milwaukee, WI, USA

LDAP maximum results

Post 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
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post 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.
User avatar
cwcollins
Forum Commoner
Posts: 79
Joined: Thu May 16, 2002 3:51 pm
Location: Milwaukee, WI, USA

Post 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
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post 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.
User avatar
cwcollins
Forum Commoner
Posts: 79
Joined: Thu May 16, 2002 3:51 pm
Location: Milwaukee, WI, USA

Post by cwcollins »

i've already been through the .ini, and can't find it... thanks anyway.

-c.w.collins
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

no prob...good luck finding the limit
User avatar
9902468
Forum Commoner
Posts: 89
Joined: Thu Jun 06, 2002 6:39 am
Location: Europe

Post 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 ;)
User avatar
cwcollins
Forum Commoner
Posts: 79
Joined: Thu May 16, 2002 3:51 pm
Location: Milwaukee, WI, USA

Post 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
Post Reply