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
LDAP maximum results
Moderator: General Moderators
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.
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
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
the php manual says:
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.NOTE: This parameter can NOT override server-side preset sizelimit. You can set it lower though.
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
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