PATH_INFO

Cliff Wells cliff at develix.com
Wed Jan 23 23:32:50 MSK 2008


On Wed, 2008-01-23 at 09:56 -0800, Dave Dash wrote:
> but really $path_info should be url_decoded before being set as a
> fastcgi_param.  Since the CGI spec says:
> 
>         The extra path information, as given by the client. In other
>         words, scripts can be accessed by their virtual pathname,
>         followed by extra information at the end of this path. The
>         extra information is sent as PATH_INFO. This information
>         should be decoded by the server if it comes from a URL before
>         it is passed to the CGI script.

>From php.ini:

; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix it's paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.

Try setting

cgi.fix_pathinfo=0

in php.ini

Regards,
Cliff






More information about the nginx mailing list