Project

General

Profile

Actions

Bug #22059

closed

t3lib_div::cleanOutputBuffers() might loop forever

Added by Stephan Seitz almost 15 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-02-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

obsoletes_ob_get_level.patch (574 Bytes) obsoletes_ob_get_level.patch Administrator Admin, 2010-02-04 18:26
13427.diff (1.28 KB) 13427.diff Administrator Admin, 2010-07-28 10:06

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #23122: Some links in typo3 backend is not responding with zlib.output_compression = On in php.iniClosed2010-07-07

Actions
Has duplicate TYPO3 Core - Bug #21866: Ext manager produce blank pageClosedSteffen Gebert2009-12-18

Actions
Actions #1

Updated by Alex Dangel almost 15 years ago

I can reproduce and verify this.

Every try to load Translation-Handling-page in Extension-Manager ends up in a "500 - Internal Server Error".

I fixed it first by uncomment the inital call of cleanOutputBuffers().
The Translation-Handling worked again, but showed the result after finishing all instead of display step by step while in progress.

I tried the Patch from Stephan and all is working the right way again.

THX for that elegant Bugfix.

@core-developers: please get this in the sources for the next release.

kind regards
Alex

Actions #2

Updated by Jacob Rasmussen over 14 years ago

I too can confirm this bug on 4.3.2 - although i'm using PHP as an ISAPI module

The bugfix works as it should

Best regards
Jacob

Actions #3

Updated by Daniel Krupke over 14 years ago

The problem seems to be solved by your patch/fix.
So, why don't you write an RFC on the Core Developer Mailing List?

http://typo3.org/teams/core/core-mailinglist-rules/

Actions #4

Updated by Steffen Gebert over 14 years ago

The patch is now pending in the core list. Please test and vote immediately (you can give your okay by answering "+1 by testing", after you did test the code and "by reading" after you read the code).

Please hurry up, if you want this in the next releases of TYPO3!

Actions #5

Updated by Trandel Miszcz over 14 years ago

The patch helped me for various versions of TYPO3 including 4.4.0. My vote +1.

Actions #6

Updated by Steffen Gebert over 14 years ago

You have to give your vote on the core team mailing list, otherwise it doesn't count.
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
(but better use a news reader news://lists.typo3.org)

Actions #7

Updated by Dmitry Dulepov over 14 years ago

revisions 8445–8447 (4.3–4.5)

Actions #8

Updated by Ingo Renner over 14 years ago

released in
4.3.5
4.4.2

Actions

Also available in: Atom PDF