Trouble using external database

Trouble using external database

by Martin Howells -
Number of replies: 1

A new installation of Moddle 2.0.2 on a Linux server running MySQL and PHP.

It is a training site for our organisation and we have tried to use the user database for the rest of the member site as the external databse for Moodle. However, when auth/db/cli/sync_users.php is ran from Cron we receive the response email that just says:

------------------------

User entries to add: 36

!!! Error writing to database !!!

------------------------

Ideally we'd love to be able to automatically log people in if they are already signed in to the member site, but searching the forums I havent so far found a definite solution to either the external database error or a recent mod to allow external cookies to automatically log a member in.

I'm new to Moodle. Have basic PHP skills, enough to modify a file if I know what needs to be done, but not enough to go playing with core files all alone. Hopefully someone here has dealt with similar issues and can point me to the correct solution?

Thanks!

Average of ratings: -
In reply to Martin Howells

Re: Trouble using external database

by Martin Howells -

SOLVED! We now have the external database working with internal password, but I'd still like to see if there is a mod/change that would avoid this again?

Problem was when there were already manually registered users with the same username as someone in the external database. The sync_users.php simply halted with an error. Is there a mod that would either ignore such entries or change the duplicate username?

Thanks.