Edit report at https://bugs.php.net/bug.php?id=55341&edit=1
ID: 55341 Updated by: f...@php.net Reported by: php-bugs at majkl578 dot cz Summary: Problem with headers longer than 4008 under FPM -Status: Assigned +Status: Bogus Type: Bug Package: FPM related Operating System: Linux Debian Sid PHP Version: 5.4SVN-2011-08-01 (snap) Assigned To: fat Block user comment: N Private report: N New Comment: To me this is not related to PHP nor FPM but to nginx. by default nginx uses 4k or 8k buffers for fastcgi. you must have an error in your nginx log file, something like: upstream sent too big header while reading response header from upstream You should play with "fastcgi_buffer_size" and "fastcgi_buffers" in your nginx.conf. See http://wiki.nginx.org/HttpFcgiModule#fastcgi_buffers for more details. I've been able to reproduce and correct the problem this way on my dev machine. If you really think this is another problem, feel free to reopen this bug. Previous Comments: ------------------------------------------------------------------------ [2011-08-02 00:11:04] php-bugs at majkl578 dot cz Description: ------------ There is a problem when headers sent from a script are longer than 4008 (see the test sript below). I'm currently using FPM with nginx 1.0.5. If headers are longer than 4008, this happens: for 4008, everything is OK, for 4009, no output is displayed, for 4010+, HTTP error 502 is returned. Similar problem has been verified under PHP 5.3.5 with different boundaries: 4012 is OK, 4013 is OK, but with no output, 4014 gives 502. Test script: --------------- OK: header(str_repeat('x', 4008)); echo 'foo'; -------------------------------- OK, but no output: header(str_repeat('x', 4009)); echo 'foo'; -------------------------------- HTTP error 502: header(str_repeat('x', 4010)); //or anything higher echo 'foo'; -------------------------------- OK: header(str_repeat('x', 2000)); header(str_repeat('y', 2006)); echo 'foo'; -------------------------------- OK, no output: header(str_repeat('x', 2000)); header(str_repeat('y', 2007)); echo 'foo'; -------------------------------- 502: header(str_repeat('x', 2000)); header(str_repeat('y', 2008)); echo 'foo'; Expected result: ---------------- foo ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55341&edit=1