diff --git a/includes/common.inc b/includes/common.inc index ea1139eee57..4812e3e528f 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -50,6 +50,12 @@ function throttle($type, $rate) { } } +function check_php_setting($name, $value) { + if (ini_get($name) != $value) { + print "

Note tat the value of PHP's configuration option $name is incorrect. It should be set to '$value' for Drupal to work properly. Either configure your webserver to support .htaccess files so Drupal's .htaccess file can set it to the proper value, or edit your php.ini file directly. This message will automatically dissapear when the problem has been fixed.

"; + } +} + function array2object($node) { if (is_array($node)) { diff --git a/index.php b/index.php index 0cd82ebec7d..f92caa3d07c 100644 --- a/index.php +++ b/index.php @@ -5,6 +5,8 @@ include_once "includes/common.inc"; page_header(); +check_php_setting("magic_quotes_gpc", 0); + if (module_hook(variable_get("site_frontpage", "node"), "page")) { module_invoke(variable_get("site_frontpage", "node"), "page"); }