[Pmwiki-users] 2.0 on IIS

Benedikt Hochstrasser bhoc
Mon Jun 14 18:04:33 CDT 2004


Patrick Michaud wrote:

>> "Undefined index REQUEST_URI on line 142" -- I don't think IIS provides 
>> REQUEST_URI. I'm not sure how to work around this one.
>
>I guess I'll have to default to using PATH_INFO if REQUEST_URI isn't
>provided/available.

In my local config.php I have only

$ScriptUrl = $_SERVER["SCRIPT_NAME"];
$PubDirUrl = dirname($ScriptUrl)."/pub";

I skip all the "$ScriptUrl = 'http://'.$_SERVER['HTTP_HOST'];" stuff because it isn't necessary anyway. Relative pathnames are friendlier than absolute ones. And if your wiki is 
behind an accelerating proxy then adding the protocol (HTTP or HTTPS) is deadly.

And "$_SERVER['REQUEST_URI']" == "$_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING']". No need to employ PATH_INFO (especially in newer PHP versions 
where PATH_INFO is often blank but ORIG_PATH_INFO is what you're after (if the web server is configured for PATH_INFO at all)

-- 
Ben




More information about the pmwiki-users mailing list