Hello Ralf,
I'm sure the process is correct for moving to https and it should work. I also got this certificate messages.
But something went wrong during the change and I'm stacked. I have no access to my admin account, the link to the users database seems to be corrupted (?). When I go back to the previous http option, same problem, no access.
The installed version is 3.12.0.
Do you think there is a way to save my ressources and users database for a new installation, I not sure to be able to repair.
Best regards.
Phil

    Monva
    Hi Phil,
    it would be no problem to send the original config.php file for the MoodleBox 3.12.0.

    I have some questions to see where your problem could be

    1. Does your MoodleBox provide a wifi? SSID MoodleBox and password moodlebox
    2. Is it possible for you to connect a computer (notebook, tablet, smartphone) to the MoodleBox via wifi?
    3. Do you get the front page with http://moodlebox.home or https://moodlebox.home?
    4. Can you login the user moodlebox with the password Moodlebox4$ into the Moodle?

    Please write in which step your MoodleBox does not work.

    Ralf

    Okay, with a look into a current MoodleBox 4.0.0 I found that my own config.php was rather old. In my update process https://discuss.moodlebox.net/d/253-upgrade-to-moodlebox-3110-from-390/5 I lost the current config.php and I am still using an old one. Now I updated to the current one.

    There is one thing that could be the reason if the Moodle front page does not start. If the web server can not read the config.php than the connection to the database will not run. Please look for the rights of the config.php file.

    • In my case the rights are -rw--r--r (644) and the owner is root:root.
    • You also can set the rights to --r--r--r (444) and the owner root:root.
    • If the owner is www-data:moodlebox then it will also work with --r------ (400).

    The user www-data is the user for the web server.

    Ralf

    So let's follow up in english!

    Just to be clear: the config.php file of version 3.12.0 is the same that in 4.0.0 (see above). And here are the correct permissions (version 3.12.0 and 4.0.0):

    moodlebox@moodlebox:~ $ ls -l /var/www/moodle/config.php 
    -rw-rw---- 1 www-data moodlebox 1123 Nov 21 12:26 /var/www/moodle/config.php

    Note: It's not possible that the simple change of config.php causes the error "Coding error detected, it must be fixed by a programmer (…)". In case of a problem with config.php, Moodle will simply fail to load at the worst (500 error), and at the best throw "Error: Database connection failed (…)".

    Hi Nicolas and Ralf. Sorry I've been away for a couple of hours. I think I've solved my problems because I recover right now all the lost functions.
    I'm not an expert, I cannot explain the reasons of the problems, I can only describe what I did. I replaced my original config file by the one Nicolas sent this morning and I deleted a config.php.save file which was not supposed to be there. Then, I canceled the "s" in the https string to return to http option. And I got access to my admin and users accounts. Of course, it doesn't work in https, I'll do first a backup and a new try in few days.

    I confirm that I run the original 3.12.0 version with no plug-in and no change in any other file. And the message error was the one I wrote.

    I don't know what you can conclude from this story, but thanks a lot for your interest and your help.

    Best regards.

    Phil

    Thank you for the feedback. Glad that everything's OK now. 👍

    4 days later

    Unfortunately, it's not that good. I've been updating courses yesterday without any problem, and today, once more, I cannot access to my admin account. Precisely, I can access to my admin account but with no rights, only for reading. And the message "codding error.....". Ratna wrote in a previous post, it could come from the moodle cache (folders moodledata/muc and moodledata/cache). Does it mean ALL the content of these two folders can be deleted with no risk? I ready to try but... Thanks for sharing your experience with me.

      Thank you Ratna for your reply and advice. I only deleted the content of the moodledata/muc folder content (which was only a config.php file) and I recovered the lost admin functions. My problems are solved, at least for the moment, but the cache seems to make the system unstable.

      Best regards.
      Phil

        Monva Conflicts with caches is a much wider problem than this. In this particular case, the cause is a discrepancy between muc/config.php and the main site. Did you change any central configuration in Moodle, like its URL?

        As a remedy Moodle offers https://docs.moodle.org/311/en/Developer_tools#Purge_all_caches in its GUI. In any case this is something MoodleBox inherited from its "upstream", the main Moodle project, https://moodle.org.

        I only tried to migrate to https.

          Monva "Tried", then gave up? That explains the conflict. moodledata/muc/config.php cached https.

          Yes I tried once, I got this problem of access to my admin account with the associated message of coding error, and then I went back to the http initial option, but still with no access (or more precisely, variable access conditions to my users database) until I deleted the cache file. Now everything works fine (but still in http).