[Pmwiki-users] 2.0 on IIS

Patrick R. Michaud pmichaud
Mon Jun 14 21:55:56 CDT 2004


On Tue, Jun 15, 2004 at 02:03:43AM +0200, Benedikt Hochstrasser wrote:
> Patrick Michaud wrote:
> 
> In my local config.php I have only
> 
> $ScriptUrl = $_SERVER["SCRIPT_NAME"];
> $PubDirUrl = dirname($ScriptUrl)."/pub";

PmWiki 2.0 so far uses just $_SERVER['SCRIPT_NAME'], skipping the
'http:' and other stuff.

dirname() was intended to work on filesystem pathnames (not URLs)
so I use the preg_replace expression instead.  But the end result
should be the same.

> 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)

While this may be true on your system, it's not true on all, or even
the majority.  On most Apache environments $_SERVER['REQUEST_URI'] is 
the same as 
$_SERVER['SCRIPT_NAME'].$_SERVER['PATH_INFO'].'?'.$_SERVER['QUERY_STRING'],
except in those environments with PATH_INFO is broken.

Pm



More information about the pmwiki-users mailing list