Re: pathinfo or other

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, All

I do not remember where I found the list of variables that are provided if
you load PHP using Apache, nginx, IIS ...
Fact is that there's a list of variables in the CGI 1.1 definition that
should be given to a cgi script:
http://tools.ietf.org/html/rfc3875#section-4
PATH_INFO is on the list and therewith should at least be given to every
cgi-script.

As not all web-server are fully compatible to the definition or do not
support cgi 1.1 there are quite much posts where you find work-arounds for
misconfiguration web-servers.
I know about nginx that you have to add a special configuration to get the
path_info - but the example provided at the developers-page sometimes
returns a wrong value. See:
http://stackoverflow.com/questions/8265941/empty-value-to-path-info-in-nginx-returns-junk-value/

Maybe there are also some other known issues around this PATH_INFO ...
Here's a request for a portable way to receive the path-info even if it's
not provided by the web-server:
http://stackoverflow.com/questions/1884041/portable-and-safe-way-to-get-path-info

I've always tried to use something like mod_rewrite and manage all incoming
requests in an own dispatcher. That helped me a lot getting around this
problems.

Hope that this gives you more detailed information in what you need.

Bye
Simon

2012/2/17 Donovan Brooke <lists@xxxxxxx>

> Elbert F wrote:
>
>> SCRIPT_NAME is a server side path, try REQUEST_URI. This includes the
>> query
>> string but it's easy to remove.
>>
>> Elbert
>> http://swiftlet.org
>>
>
>
> Hi, I thought I should say that server side SCRIPT_NAME seems to be fine
> for me in this case. Thanks for the input.
>
>
> Donovan
>
>
>
>
> --
> D Brooke
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux