Bug #64998 [Ana->Nab]: php-cgi is buffering output
| From: | rasmus@php.net | Date: | Sun, 09 Jun 2013 05:04:30 +0000 |
| Subject: | Bug #64998 [Ana->Nab]: php-cgi is buffering output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-179449@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64998&edit=1
ID: 64998
Updated by: rasmus@php.net
Reported by: m00n dot silv3r at gmail dot com
Summary: php-cgi is buffering output
-Status: Analyzed
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Ubuntu, Centos
PHP Version: 5.4.16
Block user comment: N
Private report: N
New Comment:
But you just said a similar CGI setup on Debian worked fine. To me that says it
is something in your Ubuntu CGI config. Either way, the only thing PHP needs to
do is flush stdout, and it does that. Once PHP has flushed stdout it is up to the
web server to deliver this to the browser.
Previous Comments:
------------------------------------------------------------------------
[2013-06-09 04:57:10] m00n dot silv3r at gmail dot com
This setup is HAVING ISSUE
Php 5.4.6 + Ubuntu 12.10 + Apache 2.2.22 + Cgi
------
Same machine, This setup is NOT HAVING ISSUE
Php 5.4.6 + Ubuntu 12.10 + Apache 2.2.22 + mod_php
------
Can this conclude that apache is not buffering the output ? If it indeed were,
thatn mod_php should too have the issue ?
------------------------------------------------------------------------
[2013-06-09 04:56:42] rasmus@php.net
So what exactly is your bug report?
Are you saying that:
PHP 5.4.x + Debian + Apache 2.2.22 + Cgi is fine
but
PHP 5.4.x + Ubuntu and Centos + Apache 2.2.22 + Cgi is not?
------------------------------------------------------------------------
[2013-06-09 04:50:20] m00n dot silv3r at gmail dot com
Following has been tested to be working fine
PHP Version 5.4.4-14 + Debian + Apache 2.2.22 + Cgi
Output comes in realtime as expected.
------------------------------------------------------------------------
[2013-06-09 04:20:17] rasmus@php.net
I don't see how. CGI is pretty simple. It just writes to stdout and when you call
flush() cgi does fflush(stdout). If you are seeing 4k buffers, it isn't coming
from PHP. Try it without your web server. Emulate CGI by setting the right env
variables (see the CGI spec) and you will see there is no buffering.
------------------------------------------------------------------------
[2013-06-09 04:14:11] m00n dot silv3r at gmail dot com
No mod deflate or mod gzip is there.
Apache does not appear to be buffering the output.
This is further confirmed when debugging with telnet. When opening the page with
telnet, the output comes in chunks of 4K. This indicates that its php that is
buffering the content.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=64998
--
Edit this bug report at https://bugs.php.net/bug.php?id=64998&edit=1