Re: AllowPathInfoForScriptMappings in IIS5 (was Re: [PHP] URL path question)
| From: | Christoph Grottolo | Date: | Thu, 15 Aug 2002 18:41:25 +0000 |
| Subject: | Re: AllowPathInfoForScriptMappings in IIS5 (was Re: [PHP] URL path question) | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15275@lists.php.net to get a copy of this message | ||
Seairth Jacobs wrote:
> I came accross the following IIS4/5 Metabase setting:
>
> AllowPathInfoForScriptMappings
>
> MS claims that this forces PATH_INFO and PATH_TRANSLATED to act
> according to the CGI specification, however this setting seems to
> have made no difference at all for me. I am using the IIS5 on W2K
> Pro (not Server), so this may not be an available option since this
> version of IIS is somewhat limited (though MS does not mention this).
>
> The MS KB is:
>
> http://support.microsoft.com/default.aspx?scid=kb;en-us;q184320
>
... and states, it's for IIS 4 only.
We solved the problem like this:
if (!empty($PATH_INFO)) {
$Actual_Path=$PATH_INFO;
} else {
$Actual_Path=$SCRIPT_NAME;
}
$baseDir=substr($Actual_Path,1,(strpos($Actual_Path,"/",1)-1));
This works at least in Win32 on Apache and IIS with CGI and SAPI.
Christoph