Commit c5bb6aa1 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Added more sanity checks, and a list of checks that might need to be

parent af55af21
......@@ -59,16 +59,29 @@ function ensure_sanity() {
if (ini_get_bool('magic_quotes_runtime')) {
// try turn it off, if we can't, complain bitterly
if (!ini_set('magic_quotes_runtime', 0)) {
// @todo this should be an ERROR that halts the script
else {
log_environ(get_string('magicquoteruntimeworkaround', 'error'));
// Turn of magic_quotes_runtime. Anyone with this on deserves a slap in the face
log_environ(get_string('magicquotesruntime', 'error'));
if (ini_get_bool('magic_quotes_sybase')) {
// See above comment re. magic_quotes_runtime
@ini_set('magic_quotes_sybase', 0);
log_environ(get_string('magicquotessybase', 'error'));
if (ini_get_bool('safe_mode')) {
// We don't run with safe mode
throw new ConfigSanityException(get_string('safemodeon', 'error'));
// Other things that might be worth checking:
// memory limit
// file_uploads (off|on)
// upload_max_filesize
// allow_url_fopen (only if we use this)
// dataroot inside document root.
if (strpos(get_config('dataroot'),get_config('docroot')) !== false) {
Supports Markdown
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