Bug #22059
closedt3lib_div::cleanOutputBuffers() might loop forever
0%
Description
In particular environments it is possible that ob_get_level() doesn't get updated by ob_get_clean(). As both functions relay on the same data, it's also a redundant call which might fail.
I'ld propose to replace the whole while() loop starting around #5696 by
while(ob_end_clean());
As well as t3lib_div::flushOutputBuffers() didn't break things by now, I'ld propose to rewrite that while() loop also. This could read as:
while($obContent .= ob_get_clean());
I didn't check if Output Buffers are loosly handled at other places in the code, but I suggest to clean up every potential ob_* to NOT relay on ob_get_level().
This particular Error in t3lib_div::cleanOutputBuffers() can be verified by e.g. selecting different languages at the BE extension manager.
To reproduce it, run php with FPM SAPI via FCGI pipeline. This is one of the proposed SAPI for high-traffic, high-load sites.
We were able to reproduce it on different version of FPM-enabled PHP (5.2.n as well as 5.3.0/1)
(issue imported from #M13427)
Files