problem for admin login in admin panel

Re: problem for admin login in admin panel - SOLVED

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

Welcome!  I'll probably not make what I did a habit! :|

You asked via PM 'what was wrong' ... will take this opportunity to share my 2 cent thoughts on shared hosting and the 'traditional' description of upgrading a site.

In typical shared hosting document root for web service is 'public_html' ... that's defined by web service config and as a shared user you cannot change that.

Traditional directions for upgrading say to 'move moodle code out of the way' ... well, catch 22 right off the bat ... moodle code is in public_html ... not a moodle directory.

In your situation you did have 2 moodle code directories inside the 3.4 code of you site ... both were higher versions of Moodle.

Your site uses cPanel and SoftTac for Moodle installs ... did you originally use SoftTac to install the moodle?   That would put moodle code in public_html ... not in a 'moodle' directory.

What I think I would do if having to use cPanel/etc. ...

I'd use a 'moodle' directory and code in there ... just like 'tradtional' install/uprades would expect moodle to be located.  Then one could move 'moodle' out of the way.

You say you want the moodle to be what folks see when hitting site ... fine ... use an autoforwarding index.html file with 0 seconds wait time (very old tech but still works) ... that forwards to /moodle/

Advantage ... you, the server admin, could install a tinker site in a directory called 'tinker'.  You are the only one that knows it's there ... you make no links from other pages that a search engine could find and follow.

So now, when you want to tinker with something .... https://yoursite/tinker/

For directions on autoforwarding page:

https://www.w3docs.com/snippets/html/how-to-redirect-a-web-page-in-html.html

Now that you have your site like it is, I'd not recommend changing until you read up on search and replace tool in Moodle ... Moodle records every internal link and right now your DB has https://yoursite/ as where moodle is located.

The other thing I'd recommend to you, is do read Moodle docs.  If you have a question ask!!!   Found evidence in your site that you had exported mdl_user table and then imported that table into db for newer version of Moodle by a different prefix ... mdlXXX_user ... thinking one could transfer all users from old site to new higher version site.   Same for the mdl_config table.   Had to imagine what this meant ... 'restore DB and mdl_user  ,  and restore mdl_confing' in your first post.  Sure enough ... you tried a shortcut but ...  In both cases, nope ... nada ... will never happen.   3.4 -> 3.7 there could have been a major change (and was) to DB character set/collations DB structure ... etc.

You won't see anything like the paragraph above,  @

https://docs.moodle.org/37/en/Upgrading

If you use Moodle docs ... and something goes wrong ... that's one thing ... at least those trying to help you are 'on the same page', so to speak ... but doing what you did and then not really describing that ... exactly ... sent folks helping off into a very deep and dark rabbit hole. sad  I hate going down rabbit holes! :\

'SoS', Ken



Average of ratings: Useful (1)