Menu

#63 global variables in php (Windows IIS Compability)

open
nobody
5
2004-07-29
2004-07-29
No

When running the framework on Windows with IIS (ISAPI
Mode), some global variables in PHP aren't set. This
cause errors when using the GetFrontController.
And this is a workaround:

Index: common.inc.php

=========================
RCS file: /cvsroot/wact/wact/framework/common.inc.
php,v
retrieving revision 1.37
diff -u -r1.37 common.inc.php
--- common.inc.php 23 Jul 2004 12:44:18
-0000 1.37
+++ common.inc.php 29 Jul 2004 18:47:51 -0000
@@ -41,6 +41,16 @@
*/
$ConfigurationSettings = array();

+/**
+* Workaround to run under IIS 5.0 with ISAPI mode
enabled
+*/
+$_SERVER['SCRIPT_FILENAME'] =
$_SERVER['SCRIPT_NAME'];
+$_SERVER['REQUEST_URI'] = $_SERVER['URL'];
+if (isset($_SERVER['QUERY_STRING']))
+{
+ $_SERVER['REQUEST_URI'] .= '?' .
$_SERVER['QUERY_STRING'];
+}
+

//-----------------------------------------------------
---------------------------
/**
* Represents a framework error

Discussion


Log in to post a comment.

Auth0 Logo