exit("Error: $settingsFilename.compromised exists on disk, so it's likely you need to block access to 'peppermint.json' from the internet. If you've done this already, please delete $settingsFilename.compromised and reload this page.\n\nIf you've done this check manually, please set the disable_peppermint_access_check setting to false.\n\nThis check was done as part of the first run wizard.");
exit("Oops! It looks like $settings->sitename wasn't able to write peppermint.json to disk.\nThis file contains all of $settings->sitename's settings, so it's really important!\nHave you checked that PHP has write access to the directory that index.php is located in (and all it's contents and subdirectories)? Try\n\nsudo chown USERNAME:USERNAME -R path/to/directory\n\nand\n\nsudo chmod -R 0644 path/to/directory;\nsudo chmod -R +X path/to/directory\n\n....where USERNAME is the username that the PHP process is running under.");
// * One of those new settings was firstrun_complete
// ...then we must be a pre-existing wiki upgrading from a previous version. We can guarantee this because if the firstrun_complete setting didn't exist before but it was added to an EXISTING peppermint.json (creating a NEW peppermint.json would add firstrun_complete to a new peppermint.json file, which is handled separately above)
// This is very important for when a Pepperminty Wiki instance didn't have the firstrun wizard previously but does now. This avoids the first run wizard running when it shouldn't.
// Note we added this additional specific check because in Docker containers we recommend that firstrun_complete be manually preset to false, which would previously get autset to true as we thought it was a pre-existing wiki when it isn't! Note also we don't yet have access to the pageindex at this stage, so we can't check that either.