Incompleted (truncated) PHP output

Huan Truong huantnh at gmail.com
Tue Jul 3 06:33:01 MSD 2007


I'm guessing the problem resides on gzip filter of php and/or of php->nginx 
proxying process too.

But strangely,

I have turned off the gzip filter on the code of the tiny_mce_gzip.php so 
that it will not produce gzip output AND turned off the gzip filter in the 
nginx.config file -- so that the produced output to client will not be 
compressed at all (I rechecked by debugging the returned header) - but 
things look worse. There are even more incompleted files. And they are even 
truncated at the earlier points. Even php scripts that are normally fine are 
incompleted.

Then I turned on the gzip filter of nginx again. Things went back fine. 
There are less incompleted files but this file: 
http://implicitbeauty.com/wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20070326&theme=advanced&language=en&lang=en&index=0 - 
still incompleted.

I'm guessing it's something relating to timeouts but I couldn't find out.

--

Huan, Truong -- huantnh at gmail.com
Visit my personal homepage: http://tnhh.info/

"proforg" <proforg at maloletka.ru> wrote in message 
news:FAB82E41-3F94-444A-A0D6-AA403239240B at maloletka.ru...
> On 02.07.2007, at 22:10, Huan Truong wrote:
>
>> Hi all,
>>
> Hi !
>> I met a very weird problem with nginx and PHP - nginx - in some  very 
>> rare cases, does not return the whole content of php script.  For 
>> example, this page:
>> http://implicitbeauty.com/wp-includes/js/tinymce/tiny_mce_gzip.php? 
>> ver=20070326&theme=advanced&language=en&lang=en&index=0
>> - isn't returned correctly -- It is truncated. Some other files are  also 
>> truncated, and that files resulted uncompleted web pages.
>>
>> One more example: http://hpvn.net/forum/showthread.php?t=47x
>>
>> Seems that nginx doesn't like php scripts that produce too long  results?
> No, it looks like backend<-->frontend communication problems 
> (missunderstanding :). Is it possible to have nginx debug log for  such a 
> request ?
>
>>
>> I have checked all the configurations in php.ini and nginx.conf but 
>> couldn't find anything wrong - I have updated nginx to the lastest  but 
>> both .56 and .61 have the same problem.
> Actually it looks like problem is gzip compression prodused by php,  which 
> is not correctly handled by nginx. Likely the same problem was  discussed 
> in russian nginx mail list two days ago. As a quick  workaround (at least 
> while Igor is on vacation) try to disbale gzip  encoding and usage of 
> cached gzipped files on backend by replacing  tiny_mce_gzip.php with 
> tiny_mce.php. And generally it's better not to  rely on php gzip/deflate 
> handlers at all - use nginx mod_gzip  features instead.
>>
>> This is my phpinfo file: http://tnhh.info/phpinfo.php
>>
>> Anyone has experienced this? Please help me.
>>
>> Thanks in advance.
>>
>> -- 
>>
>> Huan, Truong -- huantnh at gmail.com
>> Visit my personal homepage: http://tnhh.info/
>>
>>
>
> Aleksej Besciokov
> Email/JID: proforg at maloletka.ru
>
>
>
> 






More information about the nginx mailing list