Ruby Forum NGINX > Re: TE_ADDR in path_info

Posted by Igor Sysoev (Guest)
on 07.09.2008 10:07
(Received via mailing list)
On Fri, Sep 05, 2008 at 05:04:51PM +0200, Remo Laubacher wrote:

> Mostly this works fine but in some cases $_SERVER['PATH_INFO'] returns
> TE_ADDR. 
> Any ideas?
> 
> I'm using nginx 0.6.32 on debian 4, so far without a single problem.

Could you add $path_info variable to access_log format for this location
to see whether this is nginx or PHP bug ?
Posted by unknown (Guest)
on 07.09.2008 10:49
(Received via mailing list)
Hi Igor,

>> Mostly this works fine but in some cases $_SERVER['PATH_INFO'] returns
>> TE_ADDR.
>> Any ideas?
> 
> Could you add $path_info variable to access_log format for this location
> to see whether this is nginx or PHP bug ?
> 

You're right, the variable contains the correct value in the log file!
This is going to be nasty.. Will check if there's a problem with php 
5.2.5.

Remo
Posted by Igor Sysoev (Guest)
on 07.09.2008 10:55
(Received via mailing list)
On Sun, Sep 07, 2008 at 10:42:48AM +0200, remo.laubacher@ortic.com 
wrote:

> >> Mostly this works fine but in some cases $_SERVER['PATH_INFO'] returns
> >> TE_ADDR.
> >> Any ideas?
> > 
> > Could you add $path_info variable to access_log format for this location
> > to see whether this is nginx or PHP bug ?
> > 
> 
> You're right, the variable contains the correct value in the log file!
> This is going to be nasty.. Will check if there's a problem with php 5.2.5.

If you can easy reproduce the bug, could run tcpdump to insure that
nginx pass correct PATH_INFO to backend.
Posted by unknown (Guest)
on 07.09.2008 11:19
(Received via mailing list)
>> You're right, the variable contains the correct value in the log file!
>> This is going to be nasty.. Will check if there's a problem with php
> 5.2.5.
> 
> If you can easy reproduce the bug, could run tcpdump to insure that
> nginx pass correct PATH_INFO to backend.
> 
I can easily reproduce this error, it happens in about 30% of all 
requests!
Unfortuantely I can only reproduce this on one server - a virtual server
where I don't have access to raw packets. I guess there's no way to use
tcpdump there but I'll try it.

I could use a fast-cgi wrapper to check it too. Do you know a script I
could use to do that?

Remo
Posted by Igor Sysoev (Guest)
on 07.09.2008 11:23
(Received via mailing list)
On Sun, Sep 07, 2008 at 11:14:39AM +0200, remo.laubacher@ortic.com 
wrote:

> where I don't have access to raw packets. I guess there's no way to use
> tcpdump there but I'll try it.
> 
> I could use a fast-cgi wrapper to check it too. Do you know a script I
> could use to do that?

On BSD you may try ktrace to see all process I/O. I do not know
if strace/truss may do this.
Posted by unknown (Guest)
on 07.09.2008 12:30
(Received via mailing list)
>> could use to do that?
> 
> On BSD you may try ktrace to see all process I/O. I do not know
> if strace/truss may do this.

It's not an nginx problem!
Oh and using netcat is probably easier.. The output doens't look great 
but
it's readable.

Remo