Moodle login issue after server migration

Moodle login issue after server migration

by Dipankar Roy -
Number of replies: 17

Recently I have changed my hosting provider from GoDaddy to inmotion hosting and after that the existing users can not login to the portal. If we create a new user then there is no issue with the login. We are using Moodle 3.0.2+ (Build: 20160304). We have turned on the debugging and got the following error message from the browser in the login page.

  • line 62 of /auth/db/auth.php: call to debugging()
  • line 4180 of /lib/moodlelib.php: call to auth_plugin_db->user_login()
  • line 144 of /login/index.php: call to authenticate_user_login()


If we visit site administration -> server -> Environment then we can see the following warning message. I am not sure whether this is the source of the issue. Any help will be highly appreciated.

Other checks

InformationReportPluginStatus
unsupported_db_table_row_formatif this test fails, it indicates a potential problem

Your database has tables using Antelope as the file format. You are recommended to convert the tables to the Barracuda file format. See the documentation Administration via command line for details of a tool for converting InnoDB tables to Barracuda.

Check

Average of ratings: -
In reply to Dipankar Roy

Re: Moodle login issue after server migration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You are using external database authentication but it has not been configured. The bit of that debug message you are missing would be "The authentication method database is not configured". I'm surprised you didn't see that. 

To expand, the users have their authentication method set to external database so Moodle tries to access that to authenticate them. However, it is not set up. So, either you intend to use it and have not configured it or it will come as a surprise that your users are set to that authentication method (it should not though)

In reply to Howard Miller

Re: Moodle login issue after server migration

by Dipankar Roy -

Hi,

Thanks for your prompt reply. You are correct. There was some external database authentication configured previously. The full debug message is as follows :

The db authentication method is not set.
  • line 62 of /auth/db/auth.php: call to debugging ()
  • 4180 line of /lib/moodlelib.php: call to auth_plugin_db-> user_login ()
  • line 144 of /login/index.php: call to authenticate_user_login ()
This page will be automatically redirected. If not use the link below to continue.
Continue )

Send Error, will disable automatic redirection.

Now if I click on plugin -> Authentication -> External database, I got the Error 403 - Forbidden. You don't have permission to access the requested resource. Please contact the web site owner for further assistance. So what needs to be done in order to resolve the issue? Please let me know your expert advice. 








In reply to Dipankar Roy

Re: Moodle login issue after server migration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That's strange... I think this may be a question for your host's support. That page should not be blocked. It's not a problem in Moodle certainly. 

In reply to Howard Miller

Re: Moodle login issue after server migration

by Dipankar Roy -
Furthermore, I can not access the settings page of any of the available authentications plugins(Manual accounts, Email-based self registration and External database authentication ) within Moodle. 
In reply to Dipankar Roy

Re: Moodle login issue after server migration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes - doesn't sound like a Moodle problem. Contact your administrator / host's support. 

In reply to Dipankar Roy

Re: Moodle login issue after server migration

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

I have seen a few posts now about missing admin menus and settings following 3.1 upgrade.  I wonder if the antelope issue is not causing this.  I would start by fixing your database (there are instructions in the documentation on how to do that).  See if that by any chance resolves it.  

I would also check permissions on your moodle folder and make sure that permissions were applied recursively.

In reply to Emma Richardson

Re: Moodle login issue after server migration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I can't think of anything you could do in Moodle/PHP to end up with a 403 error. However, yes, permissions are well worth checking.

In reply to Howard Miller

Re: Moodle login issue after server migration

by Dipankar Roy -

Hi,

The permissions seems to be fine. It has been set to 0755 for both moodle and moodledata folder. Is it possible to resolve the unsupported_db_table_row_format issue in the shared hosting? Can the database issue be resolved from our end? Please let me know. I would like to proceed according to your advice.

Thanks.

In reply to Dipankar Roy

Re: Moodle login issue after server migration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes - but that isn't your problem. 

In reply to Howard Miller

Re: Moodle login issue after server migration

by Dipankar Roy -

Ok. So according to you unsupported_db_table_row_format issue is not causing the login issue in Moodle. I am also having issue downloading the pdf files in the course. I wanted to know that can the database(unsupported_db_table_row_format) issue be resolved from our end or do I need to contact with my hosting provider i.e inmotionhosting?

In reply to Dipankar Roy

Re: Moodle login issue after server migration

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Definitely not... but then I already suggested that you speak to your hosts's support wink

...three times now!

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Moodle login issue after server migration

by Dipankar Roy -

Hi,

There was no external database authentication configured previously. I have checked the information with our IT team. So why am I getting the error message that external database authentication method is not configured properly? I have talked with our hosting provider i.e inmotionhosting but they replied that they can not convert the database tables in shared hosting hence unable to assist me further. So what should be the next steps in order to resolve the issue? Please advice so that I can take action accordingly. 

In reply to Dipankar Roy

Re: Moodle login issue after server migration

by Usman Asar -
Picture of Plugin developers Picture of Testers

Just check with your hosting if they haven't enabled mod_security, in case if it did, disable it to see if things work fine.

also try setting 0777 permissions for moodledata folder.

Regarding unsupported database issue, unless you are on VPS/Dedicated or have shell access to your host, you will not be able to change it, besides, this is not what is causing issue for access.

In reply to Usman Asar

Re: Moodle login issue after server migration

by Dipankar Roy -
Thanks for your reply. I will check the mod_security with my hosting provider. Do you think it might be causing the issue? I will try setting up the permission of moodledata to 0777 and let you know if that works.
In reply to Usman Asar

Re: Moodle login issue after server migration

by Dipankar Roy -

Hi,

The issue is not yet resolved. The hosting provider has said that they are unable to resolve the issue in the shared hosting. I have checked in the config.php file within Moodle directory. I am sharing one line of code where it defines the directory permissions. Please check and let me know whether is it correct or not.

$CFG->directorypermissions = 02777;

Also at the end of the code the PHP closing tag(?>) has been defined. Is it causing any issue? Please help me out regarding the same.




In reply to Dipankar Roy

Re: Moodle login issue after server migration

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

How exactly did you do the migration?  Did you copy over your existing moodle code folder or upgrade?  I would suggest redownloading the same version (or a newer one if that is an option) and reinstalling the code part.  It could be that something corrupted during the migration.  Double check your auth folder against your old version.

Also, does moodle actually know where your database is now that is has been moved to a new server?  Did you create a user that has sufficient permissions to access it?

In reply to Dipankar Roy

Re: Moodle login issue after server migration

by Olumuyiwa Taiwo -
Picture of Plugin developers

You said:

"Furthermore, I can not access the settings page of any of the available authentications plugins(Manual accounts, Email-based self registration and External database authentication ) within Moodle."

Have you checked the permissions of the 'auth' directory? It should be 755