Best practice forum (Archived)

LDAP MaxPageSize default settings

 
? ?
LDAP MaxPageSize default settings
by ? ? - Sunday, 23 October 2011, 5:57 AM
 

Hi,

We are using LDAP (MS Active Directory) as the authentication source and to fill in profile fields.

we using the sync_users.php script to pull the users.
The problems are :

* The MaxPageSize is set to 1000 and there are more then 1000 users in the AD

* The client can't change the default setting .

Is there a way to get all the results without changing the default settings?

Thanks,

Rafi

Simon Coggins
Re: LDAP MaxPageSize default settings
by Simon Coggins - Tuesday, 25 October 2011, 1:16 AM
Group Totara

Are you talking about the reference to:

$ldapauth->sync_users(1000, true);

on the last line of auth/ldap/auth_ldap_sync_users.php ?

If so, I don't think that is limiting the number of inserts to 1000, just doing 1000 at a time.

If that's not it, could you reference the exact location? I've searched the code for MaxPageSize but nothing came up.

Simon

? ?
Re: LDAP MaxPageSize default settings
by ? ? - Tuesday, 25 October 2011, 8:09 AM
 

Hi,

The MaxPageSize is MS AD parameter it's the number of users we get from AD at a time (I should have mentioned it)

see at moodle Doc

The problem is that I cannot change the AD configuration

Rafi

Dan Marsden
Re: LDAP MaxPageSize default settings
by Dan Marsden - Tuesday, 25 October 2011, 1:31 PM
 

if you can't change the AD config - are you able to compile your own version of PHP for your server?

There's a PHP bug that is here:
https://bugs.php.net/bug.php?id=42060

A fix for this has made it into the Trunk codebase for PHP but hasn't made it into a stable release yet. If you're able to compile you're own version of PHP you could include this fix and deploy it.

More discussion on this fix is here:
http://moodle.org/mod/forum/discuss.php?d=28791

If you can't do either then you can't use the sync script.

Dan Marsden
Re: LDAP MaxPageSize default settings
by Dan Marsden - Tuesday, 25 October 2011, 2:22 PM
 

Just remembered I'd heard something about the php bug recently and looked through the comments/my e-mail history - that PHP bug fix has made it into 5.4 which is great! - so if you're able to upgrade to 5,4 when it gets released (hopefully soon) you might be ok!

- you'll also need the moodle patch mentioned here:
https://github.com/jcharaoui/moodle-cegep/wiki/PHP-LDAP-Paging

? ?
Re: LDAP MaxPageSize default settings
by ? ? - Wednesday, 26 October 2011, 1:10 AM
 

Thanks Dan ,

I think we wait to 5.4 release
if it will be OK with our client.


It was really helpful

Rafi