Edit report at http://bugs.php.net/bug.php?id=34429&edit=1

 ID:               34429
 Comment by:       m dot ghadam at gmail dot com
 Reported by:      zimage at icdsoft dot com
 Summary:          [PATCH] Output buffering cannot be turned off with
                   FastCGI
 Status:           Closed
 Type:             Bug
 Package:          CGI related
 Operating System: *
 PHP Version:      5CVS, 4CVS (2005-09-12)
 Assigned To:      mike

 New Comment:

This problem exist on php v5.3.13 or php v5.3.2 stable.

Please fix it.


Previous Comments:
------------------------------------------------------------------------
[2005-12-18 01:37:03] zimage at icdsoft dot com

I've just tested it and can confirm that flush() now works as expected.
Thank you.

------------------------------------------------------------------------
[2005-12-09 18:06:11] [email protected]

Fixed in CVS HEAD, PHP_5_1 and PHP_5_0.

------------------------------------------------------------------------
[2005-12-06 23:29:18] ilya at cs dot msu dot su

So, here is a trivial patch, that works... Sent it to
[email protected]

Hope, this will close this bug.



? khext.patch

Index: sapi/cgi/cgi_main.c

===================================================================

RCS file: /repository/php-src/sapi/cgi/cgi_main.c,v

retrieving revision 1.271

diff -u -r1.271 cgi_main.c

--- sapi/cgi/cgi_main.c 3 Dec 2005 01:27:37 -0000       1.271

+++ sapi/cgi/cgi_main.c 6 Dec 2005 21:58:18 -0000

@@ -264,13 +264,15 @@



 static void sapi_cgibin_flush(void *server_context)

 {

-       if (!FCGX_IsCGI()) {

+       int flush_result;

+    if (!FCGX_IsCGI()) {

                FCGX_Request *request = (FCGX_Request *)
server_context;

-               if (

+               flush_result = FCGX_FFlush(request->out);

+        if (

 #ifndef PHP_WIN32

                !parent &&

 #endif

-               (!request || FCGX_FFlush(request->out) == -1)) {

+               (!request || flush_result == -1)) {

                        php_handle_aborted_connection();

                }

                return;

------------------------------------------------------------------------
[2005-11-30 06:26:27] ilya at cs dot msu dot su

I've the same problem... At the newest php, on Debian and FreeBSD,
doesn't matter, using fastcgi compiled in... Any suggestions about this
problem?!



It is a very important bug for me, because I'd like to give webpages to
users by parts, compiling them on fly!-)

------------------------------------------------------------------------
[2005-11-19 03:50:22] fabwash at hotmail dot com

I have the same problem.. What I did was to send a lot of blank space to
fill up the buffer:



add_message($id, str_pad('',4096));



That fixed the problem but increases the bandwidth.

------------------------------------------------------------------------


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

    http://bugs.php.net/bug.php?id=34429


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=34429&edit=1

Reply via email to