Commit 80e64387 authored by Francois Marier's avatar Francois Marier

ensure_sanity: throw an error when apc.stat=0

This configurations simply doesn't work with the way that Dwoo
caches its templates.

So we can't run with APC unless apc.stat=1.
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 41255233
......@@ -47,6 +47,9 @@ $string['magicquotessybase'] = 'You have dangerous PHP settings, magic_quotes_sy
$string['safemodeon'] = 'Your server appears to be running safe mode. Mahara does not support running in safe mode. You must turn this off in either the php.ini file, or in your apache config for the site.
If you are on shared hosting, it is likely that there is little you can do to get safe_mode turned off, other than ask your hosting provider. Perhaps you could consider moving to a different host.';
$string['apcstatoff'] = 'Your server appears to be running APC with apc.stat=0. Mahara does not support this configuration. You must set apc.stat=1 in the php.ini file.
If you are on shared hosting, it is likely that there is little you can do to get apc.stat turned on, other than ask your hosting provider. Perhaps you could consider moving to a different host.';
$string['datarootinsidedocroot'] = 'You have set up your data root to be inside your document root. This is a large security problem, as then anyone can directly request session data (in order to hijack other peoples\' sessions), or files that they are not allowed to access that other people have uploaded. Please configure the data root to be outside of the document root.';
$string['datarootnotwritable'] = 'Your defined data root directory, %s, is not writable. This means that neither session data, user files nor anything else that needs to be uploaded can be saved on your server. Please make the directory if it does not exist, or give ownership of the directory to the web server user if it does.';
$string['couldnotmakedatadirectories'] = 'For some reason some of the core data directories could not be created. This should not happen, as Mahara previously detected that the dataroot directory was writable. Please check the permissions on the dataroot directory.';
......
......@@ -131,6 +131,11 @@ function ensure_sanity() {
throw new ConfigSanityException(get_string('safemodeon', 'error'));
}
if ('0' === ini_get('apc.stat') or 'off' === ini_get('apc.stat')) {
// We don't run with apc.stat=0 (see https://bugs.launchpad.net/mahara/+bug/548333)
throw new ConfigSanityException(get_string('apcstatoff', 'error'));
}
// Other things that might be worth checking:
// memory limit
// file_uploads (off|on)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment