[wp-trac] [WordPress Trac] #18239: wp_ob_end_flush_all() hangs the output buffering, during plugin update/install

WordPress Trac noreply at wordpress.org
Thu Sep 17 18:48:33 UTC 2020


#18239: wp_ob_end_flush_all() hangs the output buffering, during plugin
update/install
-----------------------------+------------------------
 Reporter:  mamborambo       |       Owner:  (none)
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Upgrade/Install  |     Version:  3.2.1
 Severity:  minor            |  Resolution:  duplicate
 Keywords:  output hangs     |     Focuses:
-----------------------------+------------------------
Changes (by pbiron):

 * status:  new => closed
 * resolution:   => duplicate


Old 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.

New 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.

--

Comment:

 Duplicate of #18525.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/18239#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list