From d686bf500b471e051d12b0649029da82646a4a2b Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 28 Jan 2003 02:52:13 +0000 Subject: [PATCH] Added some checks for PHP server variables - warnings are printed that prevent installation until these are fixed. --- admin/index.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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'))) { -- 2.39.5