[PATCH] bug #34429 - Output buffering cannot be turned off with FastCGI

php.internals

Ilya M. Slepnev

20 years ago
Hi, Now, flush() works in fastcgi... It seems, that the developers forgot about lazy compilation!-) What do you think about that? Best rgds, Ilya

Antony Dovgal

20 years ago
On 07.12.2005 01:08, Ilya M. Slepnev wrote:
> Hi, > > Now, flush() works in fastcgi... > It seems, that the developers forgot about lazy compilation!-)
What the heck is that?
> What do you think about that?
I think you need to explain what are you trying to fix and why.
-- Wbr, Antony Dovgal

Dmitry Stogov

20 years ago
Hi Ilya, Your patch is wring. It may try access request->out then request is NULL. Thanks. Dmitry.

Ilya M. Slepnev

20 years ago
Hi Dmitry, What about adding "if (request) " at the beginning of the "flush_result = FCGX_FFlush(request->out);" string? You see, you have to do that call, because else you are not flushing at all in fastcgi mode at all!-) Thanks, Ilya. 12/7/2005, "Dmitry Stogov" <dmitry@zend.com> вы писали:

Michael Wallner

20 years ago
Hi Ilya M. Slepnev, you wrote:
> Hi Dmitry, > > What about adding "if (request) " at the beginning of the > "flush_result = FCGX_FFlush(request->out);" string? You see, you have > to do that call, because else you are not flushing at all in fastcgi > mode at all!-)
Yes, it now makes fcgi flush it's data down the socket [1], but apaches filter brigade still keeps buffering for me (I'm using Apache2 with mod-fcgid), even if I set OutputBufferSize to 0. I'll have another look at it, when I've got some time. [1] http://dev.iworks.at/PATCHES/bug_34429_fcgi_flush.diff.txt Regards,
-- Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz

Dmitry Stogov

20 years ago
So the problem in mod_fcgi or Apache configuration. I made tests with ZendEnabler and it works (It is available as part of ZendCore). Thanks. Dmitry.

Michael Wallner

20 years ago
Hi Dmitry Stogov, you wrote:
> So the problem in mod_fcgi or Apache configuration. > I made tests with ZendEnabler and it works (It is available as part of > ZendCore). >
Hi Dmitry, in my case it was mod_deflate buffering the data, disabling it worked here well too. Commit then? :) Thanks,
-- Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz

Dmitry Stogov

20 years ago
Sorry. What do you like to commit? flush() works without any patches for me. Thanks. Dmitry.

Michael Wallner

20 years ago
Hi Dmitry Stogov, you wrote:
> Sorry. What do you like to commit? > flush() works without any patches for me.
Well, sorry too then. Seems that we misunderstood each other. I don't know anything about ZendStuff, but PHP fcgi won't flush without that patch. Regards,
-- Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz

Dmitry Stogov

20 years ago
I undestood the problem. You run PHP without PHP_FCGI_CHILDREN, so PHP doesn't spawn additional processes (old php version spawned 8 processes by default). I fixed the bug in proper way in CVS HEAD, PHP_5_1 and PHP_5_0. Thanks. Dmitry.

Michael Wallner

20 years ago
Dmitry Stogov wrote:
> I undestood the problem. > You run PHP without PHP_FCGI_CHILDREN, so PHP doesn't spawn additional > processes (old php version spawned 8 processes by default). > > I fixed the bug in proper way in CVS HEAD, PHP_5_1 and PHP_5_0.
Confirmed! Thanks a lot,
-- Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz