Why the upgrade key does not work?

Why the upgrade key does not work?

by mimi nom -
Number of replies: 1

Hello,

Even if I set the upgrade key in the "config.php" file as mentioned in the upgrade documentation, anonymous users can still see the upgrade page, moodle never ask to enter the upgrade key why?

I noticed this issue in moodle 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, and 3.6

Thanks for your help

Average of ratings: -
In reply to mimi nom

Re: Why the upgrade key does not work?

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Make sure $CFG->upgradekey is before require_once() at the end of config.php, e.g.:


$CFG->upgradekey = 'my_upgrade_key';
require_once(__DIR__ . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!