Hi all, I'm afraid I made a mistake and I am not sure how to fix it. I have obtained an SSL certificate for our domain, but forgot to enable the option 'use HTTPS for logins' beforehand. As you might expect, I am now locked out of our Moodle server and somehow the lay-out of our page has also faulted. I have learned that there should be an easy way to fix this mistake by enablign loginhttps using phpMyAdmin over the hosting provider. I have managed to use SQL and find the file 'mdl_config' where the 'loginghttps' value should be located. Unfortunately, it is not (see screenshot below). |
If you're not seeing a setting in that table, it means it hasn't been set. You can either create a record with name = 'loginhttps', value = 1 (you'll probably need to purge caches as well), or you could add $CFG->loginhttps = 1; to your config.php (which will always override what's set in the database).
An alternative would be to set your $CFG->wwwroot to start with https://, which is sensible in any case. There's no reason to use https only for login.
An alternative would be to set your $CFG->wwwroot to start with https://, which is sensible in any case. There's no reason to use https only for login.
Many thanks, Mark!
I made the change you suggested and adding this one 's' to the wwwroot did the trick.
Just in case anyone else is having a similiar question, I had to spend some more time locating the right config.php file. In my case it was located in: httpdocs / config.php.
Also, there is some useful documentation on transitioning to HTTPS behind this link, which I wish I would've read before starting off
"loginhttps" was removed in 3.4 (MDL-42834) - see note in upgrade file