View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002936 | mantisbt | bugtracker | public | 2003-02-16 14:19 | 2003-12-13 04:47 |
| Reporter | Assigned To | jfitzell | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | x86 | OS | Windows 2000 | ||
| Product Version | 0.18.0a1 | ||||
| Summary | 0002936: SYSTEM WARNING: ob_gzhandler() used twice | ||||
| Description | SYSTEM WARNING: ob_gzhandler() [<a href='<a href="http://www.php.net/ref.outcontrol'>ref.outcontrol</a>">http://www.php.net/ref.outcontrol'>ref.outcontrol</a></a>;]: output handler 'ob_gzhandler' cannot be used twice error at the bottom of the view_all_bug_page.php (no problems accessing options) I didn't find other pages with this bug (Bert Huijben / Aim-4 / <a href="mailto:bert-mantisbt@a4scan.vsoft.nl" target="_new">bert-mantisbt@a4scan.vsoft.nl</a> / no account yet) | ||||
| Steps To Reproduce | Just upgraded from 1.7.5.. Just visited bug overview. | ||||
| Tags | No tags attached. | ||||
|
I could not reproduce this error. I even added code to detect multiple calls to compress_start() and it did not trap cases where compress_start() was called more than once. |
|
|
Just for the record, I did my testing on PHP Version 4.2.3 / FreeBSD / Internet Explorer 6. |
|
|
The error message is stupid. It isn't that it's being called twice, it's that it was being applied to a nested output buffer and it only works when applied to the outermost output buffer. This required some reworking but has been fixed in CVS. |
|
|
MantisBT: master dd4ac8a7 2003-02-16 20:50 Julian Fitzell Details Diff |
Fix issue 0002936: 'SYSTEM WARNING: ob_gzhandler() used twice' I had to rework the compression stuff. The problem is that ob_gzhandler() can't be used on anything except the top-level output buffer (because the entire HTTP response has to be encoded). What I did was register our own handler in the ob_start() call in core.php. It always gets called and then *it* decides whether to call ob_gzhandler() based on the value of a global variable. The result is that we can have nested output buffers again (though actually we end up not needing them -we just turn on compression when we want it instead of starting a new buffer) and also that error_api can disable compression again when it clears the buffer. This means that when an error is triggered on view_all_bug_page, you no longer see a blank screen. * bug_view_advanced_page.php: * bug_view_page.php: * view_all_bug_page.php: call compress_enable() instead of compress_start() and don't call compress_stop() * core.php: give compress_handler as the output buffering handler * core/compress_api.php (compress_start): deleted (compress_stop): deleted (compress_is_enabled): check the value of the global variable too (compress_handler): new function that handles the processing of the output buffer, compressing it if appropriate (compress_enable): (compress_disable): 2 new functions that just set the state of the global variable * core/error_api.php (error_handler): call compress_disable() before ob_end_clear() so that the GZIP encoded header doesn't get sent when our data isn't gzip encoded git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1895 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0002936 |
|
| mod - core.php | Diff File | ||
| mod - view_all_bug_page.php | Diff File | ||
| mod - bug_view_advanced_page.php | Diff File | ||
| mod - bug_view_page.php | Diff File | ||
| mod - core/error_api.php | Diff File | ||
| mod - core/compress_api.php | Diff File | ||