]> git.mjollnir.org Git - moodle.git/commitdiff
Added some checks for PHP server variables - warnings are printed that
authormoodler <moodler>
Tue, 28 Jan 2003 02:52:13 +0000 (02:52 +0000)
committermoodler <moodler>
Tue, 28 Jan 2003 02:52:13 +0000 (02:52 +0000)
prevent installation until these are fixed.

admin/index.php

index 53fccfbe04079057fdc384dced1fb81762b0e4bf..d2da23f24ef0dcdc662d0d4de1707a6f6e141fc3 100644 (file)
         die;
     }
 
+/// Check some PHP server settings
+
+    $documentationlink = "please read the <A HREF=\"../doc/?frame=install.html&sub=webserver\">install documentation</A>";
+
+    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'))) {