External Authentication Login Issue

External Authentication Login Issue

by Abdul Rahim Bhatti -
Number of replies: 11

Following are the configured settings  for moodle 3.4

  • Setup Moodle 3.4 on Windows Server 2012R2.
  • Configure PHP 7.0 version "PHP VC14 x64 Non Thread Safe (2017-Nov-22 23:50:28)".
  • Using Visual C++ Redistribution 64-bits (to run php 7.0).
  • Install MSSQL Driver (SQLSRV40) for PHP 7.0 from Microsoft site and add required extension name in PHP.ini
  • Add required handlers into IIS to run the site.
  • Using Database MSSQL Express for Moodle (main database)
  • For user login using "External Login" Plugin and use already setup table to validate authentication (username and passwords) from that table.

Problem:

Moodle 3.4 stable version is configured successfully, External Login Plugin's Test Authentication page is also giving success message with query and driver details, But when we are trying to login with external login its continuously loading and returning  errorcode=3.

We had already setup moodle version 2.9 with same external login using same database and authentication table all is working fine, now we want to upgrade moodle to latest version 3.4. going forward after 2.9  we have tried all moodle versions (3.0, 3.0.10, 3.1, 3.2, 3.3, and 3.4) all have same login issue with external logins.

Followed all upgrade steps by moodle docs and also configure new stand alone moodle site on 3.4 version but having same issue.

Can any one please help to get this fixed ?

Average of ratings: -
In reply to Abdul Rahim Bhatti

Re: External Authentication Login Issue

by Abdul Rahim Bhatti -

Any one can help out to resolve this ?

Moodle Team ?

In reply to Abdul Rahim Bhatti

Re: External Authentication Login Issue

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

What do you mean by external login?  Database authentication?  LDAP?  Manual?  Have you turned debugging on to see if you get additional error messages?  Do you have a firewall that might be blocking something?

 

In reply to Emma Richardson

Re: External Authentication Login Issue

by Abdul Rahim Bhatti -

Yes, using External Database Plugin for authentication and enabled debugging found no error messages,

Just loading and returns errorcode=3 in browser address bar while enter username / password and click submit

No firewall is blocking because all same settings are working fine with moodle 2.9

Attachment ExternalLogin.png
In reply to Abdul Rahim Bhatti

Re: External Authentication Login Issue

by Abdul Rahim Bhatti -

Is there any one can help to resolve this issue please 

In reply to Abdul Rahim Bhatti

Re: External Authentication Login Issue

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

errorcode=3 normally means incorrect login info...

By chance, is the user that you are trying to log in as also a manual account?  Have you tried with several different accounts?

In reply to Emma Richardson

Re: External Authentication Login Issue

by Abdul Rahim Bhatti -

@Emma Richardson

No, i am trying to login user is from external database.

Yes i have tried multiple accounts and having same issues.

I am surprised we have already setup and working two moodle sites on version 2.9 with all same settings and all are working fine on that, But moving forward to new versions of moodle after 2.9, i have tried all versions 3.0,3.0.10,3.1,3.2,.3.3 and 3.4 having same issue

In reply to Abdul Rahim Bhatti

Re: External Authentication Login Issue

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

But other sites are on a different server?  I would suspect a firewall maybe...

In reply to Emma Richardson

Re: External Authentication Login Issue

by Abdul Rahim Bhatti -

@Emma Richardson

Both 2.9 and 3.4 are installed on the same server.

In reply to Abdul Rahim Bhatti

Re: External Authentication Login Issue

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

I use LDAP and I have seen a few similar posts - all of those ended up being a setting in there wrong.  I presume you have tried clearing all the settings and reentering one by one checking for errant spaces for example..I know that I have thought many times I had copied everything over to find a space at the end of the password that was messing everything up.

I think if there was an issue with the plugin, we would see a lot more posts.  So I suspect either a setting is wrong, database username or password is wrong or your server firewall is blocking this one site for some reason.  I know you say the database connection comes back as ok - are you using the same database user to connect?  Same tables?

Have you tried to run the sync from the command line with debugging on?  Perhaps that would tell you something else?

 

In reply to Emma Richardson

Re: External Authentication Login Issue

by Abdul Rahim Bhatti -

Thank you @Emma Richardson

I will review all my settings and configurations again to see if something is wrong under settings, credentials or any thing else which is not allowing users to authenticate in our case or External Database Plugin.

In reply to Abdul Rahim Bhatti

Re: External Authentication Login Issue

by Lokesh waran -

Hi Everyone - I am facing similar issue, but getting some different error.  I have setup Moodle 3.4 with IIS server.. Following are my configurations.

--Windows Server 2012 R2

-- IIS Server 8

-- Moodle 3.4

-- Php 7.0

I have setup LDAP & connection is successfull, but due to some restrictions in my network they are not allowing personal information to be retrieved from LDAP server. So when users login(for the first time), it is asking for profile information to be updated.  If number of users are less, then this can be handled.. But we have some 4k users and we need to handle this in automated way.

What steps we took?

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

1) We tried to connect with View table from Oracle 11g db & access that view table, in order to allow users successful moodle Login. But we are getting "Missing extension for Native" error. We ensured that, extensions are enabled in Php.INI & IIS server has been restarted., but no luck. 

After we enabled that OCi8.dll in Php.ini , we are getting below error " The Procedure Entry point OCIstmtgetNextResult could not be located in the dynamic link library PHP_OCi8_12c.dll"

So bit confused, we have given all parameters with relevant to 11g database, but we have Php_oci8_12c.dll extensions in php.ini. is this something wrong?. please advise... We are new to moodle community so if there is any other way I should post this queries, please guide.


thanks much in advance..