Best practice forum (Archived)

LDAP MaxPageSize default settings

 
??
LDAP MaxPageSize default settings
?? 发表于 2011年10月23日 Sunday 05:57
 

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

CogginsSimon
Re: LDAP MaxPageSize default settings
CogginsSimon 发表于 2011年10月25日 Tuesday 01:16
小组 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
?? 发表于 2011年10月25日 Tuesday 08:09
 

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

MarsdenDan
Re: LDAP MaxPageSize default settings
MarsdenDan 发表于 2011年10月25日 Tuesday 13:31
 

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.

MarsdenDan
Re: LDAP MaxPageSize default settings
MarsdenDan 发表于 2011年10月25日 Tuesday 14:22
 

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
?? 发表于 2011年10月26日 Wednesday 01:10
 

Thanks Dan ,

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


It was really helpful

Rafi