Opened 12 years ago
Last modified 3 years ago
#18239 closed defect (bug)
wp_ob_end_flush_all() hangs the output buffering, during plugin update/install — at Initial Version
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.2.1 |
Component: | Upgrade/Install | Keywords: | output hangs |
Focuses: | Cc: |
Description
Symptom: During plugin update process, the screen displays "Downloading {plugin}" then appears to hang.
System: Apache2 on LinuxMint-11
I traced the fault to the following function:
send_message() in /wp-admin/includes/misc.php
this function writes out the message, then tries to flush
the buffers by calling wp_ob_end_flush_all()
the mechanism of the ob_flush is to repeatedly call ob_end_flush until there is no more levels.
On the default configuration of LinuxMint / Debian, zlib.output_compression is ON, and this interferes with ob_end_flush
Based on notes from php.net, ob flushing is not necessary.
SOLUTION:
1) Either change php.ini to set zlib.output_compression to OFF, or
2) shortcircuit the wp_ob_end_flush_all() by adding an immediate return to the first line.
RECOMMENDATION:
In future versions of Wordpress, the interaction between ob and zlib should be studied carefully to derive the most universal solution.