Francis Daly
May 05, 2013 04:00AM
On Sat, May 04, 2013 at 07:41:43PM -0400, zakaria wrote:
> Francis Daly Wrote:

Hi there,

> So on the friday I rerun the script (to enhanced it) and it didn't work like
> it used to.
> I swear, I got nginx working perfectly before with PATH_INFO and all.
>
> To answer your question. The PATH_INFO should output to '/foo/bar.php'

> And the result with cgi.fix_pathinfo = 1 (the default)

As an aside -- I find that "cgi.fix_pathinfo = 1" removes the "do what
I say" part of php configuration, so I run without it. But I don't
believe that that's relevant here.

> 'PATH_INFO' => '',
> 'TEST_PATH_INFO' => '',

Thanks for testing that. It suggests to me that the problem is on the
nginx side: $fastcgi_path_info is empty at the time the fastcgi_param
directive takes effect.

> So here's my request to you all:
> 1. Is my config correct? I'm sure it is.

It doesn't do what you want it to do, which is a strong hint in one
direction ;-)

But I don't see any reason why that should be the case.

I do see two possible config changes you could make, each of which seems
enough to get things working as you want.

Either: remove the "try_files" line; or replace the "fastcgi_param
PATH_INFO" line with two lines:

fastcgi_param PATH_INFO $mypath;
set $mypath $fastcgi_path_info;

These seem to work because $fastcgi_path_info does have the correct
value in the "rewrite" phase, but loses it after the "try files" phase. I
don't understand why that is the case. That upsets me.

> 2. Could you try it on your system and
> tell me whether the output differ from mine?

I get the same output, using both nginx 1.2.4 and 1.0.0.

And either change "fixes" it on each.

> 3. Is there something wrong on the latest ubuntu precise?
> Or is it just my imagination that I have it working before? :)

Were you perhaps previously using an older nginx version where it worked
as expected?

Or is the "try_files" line a new addition since Friday?

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 03, 2013 09:44PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

GreenGecko May 03, 2013 09:56PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 03, 2013 11:23PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

Francis Daly May 04, 2013 07:58AM

Re: Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 04, 2013 07:41PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

B.R. May 04, 2013 08:16PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 04, 2013 09:02PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

Francis Daly May 05, 2013 04:00AM

Re: Problem with fastcgi_split_path_info on ubuntu precise

zakaria May 05, 2013 07:04AM

Re: Problem with fastcgi_split_path_info on ubuntu precise

Francis Daly May 07, 2013 04:38PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

vilsack May 13, 2013 02:49PM

Re: Problem with fastcgi_split_path_info on ubuntu precise

Francis Daly May 14, 2013 05:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready