From: moodler Date: Tue, 28 Jan 2003 02:52:13 +0000 (+0000) Subject: Added some checks for PHP server variables - warnings are printed that X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d686bf500b471e051d12b0649029da82646a4a2b;p=moodle.git Added some checks for PHP server variables - warnings are printed that prevent installation until these are fixed. --- diff --git a/admin/index.php b/admin/index.php index 53fccfbe04..d2da23f24e 100644 --- a/admin/index.php +++ b/admin/index.php @@ -18,6 +18,30 @@ die; } +/// Check some PHP server settings + + $documentationlink = "please read the install documentation"; + + if (!ini_get('short_open_tag')) { + error("The PHP server variable 'short_open_tag' is not turned on - $documentationlink"); + } + + if (!ini_get('magic_quotes_gpc')) { + error("The PHP server variable 'magic_quotes_gpc' is not turned on - $documentationlink"); + } + if (ini_get('magic_quotes_runtime')) { + error("The PHP server variable 'magic_quotes_runtime' should be Off - $documentationlink"); + } + + if (!ini_get('file_uploads')) { + error("The PHP server variable 'file_uploads' is not turned on - $documentationlink"); + } + + if (ini_get('session.auto_start')) { + error("The PHP server variable 'session.auto_start' should be Off - $documentationlink"); + } + + /// Check that sessions are supported if (!is_readable(ini_get('session.save_path'))) {