LDAP SyncPlus - problem

LDAP SyncPlus - problem

by Mario Gharib -
Number of replies: 3

Dear Moodlers,

We are using:

  1. Moodle 3.1 (Postgresql 9.2.2; PHP Version 5.5.26) with
  2. Server RedHatEnterpriseServer 5.3 Tikanga (Apache/2.2.4) RAM 32GB; CPU 8 GHz,
  3. LDAP server (Sync Plus) plugin: Version v3.1-r1 (2016071900)

We are trying to sync all our LDAP new users (that has not logged in into Moodle),

Since the LDAP plugin doesn't give me this option, we installed the LDAP SyncPlus plugin,

So what we did is the following:

  1. We Inserted the folder LDAP SyncPlus in the following place on Linux:
    [full path to moodle]/auth,
  2. We disabled the auth_ldap plugin,
  3. We configured and activated the auth_ldap_syncplus plugin,
  4. We updated the table mdl_user by executing:
    UPDATE mdl_user SET auth='ldap_syncplus' WHERE auth='ldap'

We tried to schedule a task for auth_ldap_synchplus (through site administration -> server -> Scheduled tasks) but it keep showing ASAP,

So what we did is the following:

we executed

php [full path to moodle]/admin/tool/task/cli/schedule_task.php --execute=\\auth_ldap\\task\\sync_task

And here is what we are getting as a PHP Fatal error:

PHP Fatal error:  Allowed memory size of 402653184 bytes exhausted (tried to allocate 72 bytes) in /usr/local/apache2/htdocs/moodle2.2/lib/dml/pgsql_native_moodle_database.php on line 812

Potential coding error - active database transaction detected during request shutdown:

* line 419 of /auth/ldap_syncplus/auth.php: call to moodle_database->start_delegated_transaction()

* line 54 of /auth/ldap_syncplus/classes/task/sync_task.php: call to auth_plugin_ldap_syncplus->sync_users()

* line 137 of /admin/tool/task/cli/schedule_task.php: call to auth_ldap_syncplus\task\sync_task->execute()


I tried to modify the memory_limit by

  1. memory_limit 1024M,
  2. restart apache server,

But it keeps giving me the same error,


Your help would be very appreciated 

Attachment test.png
Average of ratings: -
In reply to Mario Gharib

Re: LDAP SyncPlus - problem

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I am not familiar with the SyncPlus plugin but it looks like you are just hitting a timeout.

FYI - the regular LDAP has a sync utility.  It is built in the Scheduled Tasks and can be enabled there or, if you do not enable in scheduled tasks, you can run it manually from moodle/auth/ldap/cli folder.

It could be an issue with syncplus so you could just revert to the regular ldap module.

In reply to Emma Richardson

Re: LDAP SyncPlus - problem

by Mario Gharib -

Thank you Emma for your reply,

The thing is that with the regular LDAP, we do not have the option of adding new users

In the LDAP sync plus I have this option, as it is shown in the figure below.

test

I am afraid if I sync using the regular LDAP, all modifications that users made on Moodle (for example, we have users who changed their emails on Moodle) will be lost and will be replaced by original information on LDAP,

In reply to Mario Gharib

Re: LDAP SyncPlus - problem

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You can add new users with LDAP.  Plus you can switch the update local behavior to only update when the user is created which would take care of your students adding emails.  Also, once you have it going, you can set it up where any change in moodle is saved in ldap.

Anyway, I guess if you continue to have trouble with the plugin you are using, you might check with the developer.  I can see that it has a few extra features but everything you have mentioned is already in the original plugin.