Cannot login after moving site to new server

Re: Cannot login after moving site to new server

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

Let's step back a minute or two here ... this ...

"The mnet_localhost_id is the same in the config table and the user table in my case its set to 3."

you had used moodle networking on former hosting environment?   That environment was what?

There is at least one user that should always remain manual ... that of the initial installer ... user ID 2.

What does this query of your db show:

mysql> select id,auth,mnethostid,firstname,lastname,email from mdl_user where id = '2';

mnethostid for a moodle instance that has never pariticipated in mnet, should be 1.

And by default, without configuring  or setting up moodlenetworking, wwwroot and ip columns of mdl_mnet_host table is set to the instance one is in ... https://currentsite and the IP is the IP of the server.

That might explain why switching the DB's to the new db created when installing in config.php one can login.

So when you migrated the site to new host, mind describing how you did that?

In previous postings involving migrating from localhost to server sorta indicated a non-standard approach - like installing a blank site first, then replacing new DB with old DB ... how about moodledata?

'spirit of sharing', Ken


Average of ratings: Useful (1)