SCRIPT_FILENAME is not set on IIS 5.1 php cgi
[squirrelmail.git] / include / load_prefs.php
index d6e30f3163b3dc9692f7ca76747b3a49eb3785cd..626c07ccc501d32eab19f3cbfe9afaa48b87c96d 100644 (file)
  * @package squirrelmail
  */
 
  * @package squirrelmail
  */
 
-
 /**
  * do not allow to call this file directly
 /**
  * do not allow to call this file directly
+ * FIXME: PHP CGI (at least on IIS 5.1) does not set 'SCRIPT_FILENAME' and
+ * code does not handle magic_quotes_gpc=on.
  */
  */
-if ((isset($_SERVER) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) ||
-     (isset($HTTP_SERVER_SERVER) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) {
+if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) ||
+     (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) {
     header("Location: ../src/login.php");
     die();
 }
     header("Location: ../src/login.php");
     die();
 }