diff --git a/includes/common.inc b/includes/common.inc index ea1139eee573e0d4ff2ede084db77530daa6d12f..4812e3e528ffc536863564ce2530e00201c9eb89 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 0cd82ebec7d33e826e62f42a9546f6807b73a3f8..f92caa3d07c71c88a7a5c2633660b1db2d667cbe 100644 --- a/index.php +++ b/index.php @@ -5,6 +5,8 @@ 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"); }