MS-IIS: path configuration
From phpCMS
[edit] phpCMS path configuration for ISS
When installing phpCMS on a Microsoft IIS server, one could end up with crippled links like this one:
http://www.example.com/parser/parser/parser.php?file=/index.htm
where there is obviously one '/parser' too much.
In that case one should check if the server does not set a global variable 'PATH_TRANSLATED' - and unlike as with Apache, this variable does not contain the current script, but the document root. [1]
(Leave it to Microsoft to completely mis-interpret existing standards ... ;)
[1] To check this, one should use a 'phpinfo' script on the webserver.
The instructions on how to create a 'phpinfo' file can be found here.
To overcome this problem, one has to configure the path manually. As the document root is determined correctly by phpCMS, one can keep the auto-detection there, only the parser path and filename must be given.
Caveat: Always start paths with a '/'!.
So, in this case (and most likely in all others that run phpCMS on IIS), the configuration in the /parser/include/default.php file should be set as follows:
$this->DOCUMENT_ROOT = $PHP->GetDocRoot(); $this->SCRIPT_PATH = "/parser"; // was: $PHP->GetScriptPath() $this->SCRIPT_NAME = "parser.php"; // was: $PHP->GetScriptName()
(One would of course have to adapt this if one renamed the parser directory and/or script.)
(After this thread in the phpCMS support forum, solution by Thilo "Ignatius" Wagner and Andre "Guandalug" Meiske)
Main Page: Tutorials MainPage | Top Page: MiniHowTos MainPage
Diese Seite in anderen Sprachen: Deutsch

