Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PHP 7.3 #79

Closed
bobbingwide opened this issue Aug 12, 2019 · 4 comments
Closed

Support PHP 7.3 #79

bobbingwide opened this issue Aug 12, 2019 · 4 comments
Assignees
Labels

Comments

@bobbingwide
Copy link
Owner

@bobbingwide bobbingwide commented Aug 12, 2019

A number of changes are required to oik-bwtrace to support PHP 7.3

  1. Need to update table of end-of-life.
  2. Fix for a problem associated with ob_end_flush()
Notice: Undefined index: 7.3 in 
C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\admin\class-oik-trace-info.php 
on line 228
Notice: ob_end_flush(): failed to send buffer of zlib output compression (0)
 in /home/oikcouk/public_html/wp-includes/functions.php on line 4212
ob_get_flush(): failed to send buffer of zlib output compression (0) 
in /home/oikcouk/public_html/wp-content/plugins/oik-bwtrace/includes/oik-actions.php on line 30

Current version of PHP on oik-plugins.co.uk 7.3.8

@bobbingwide

This comment has been minimized.

Copy link
Owner Author

@bobbingwide bobbingwide commented Aug 12, 2019

I'll need to install PHP 7.3 locally

@bobbingwide

This comment has been minimized.

Copy link
Owner Author

@bobbingwide bobbingwide commented Aug 12, 2019

Note: My hosting with TSOhost was updated to PHP 7.3 automatically. The messages have started to appear on a number of sites. There is a workaround.

Workaround

  • Open cPanel for the domain
  • Use the MultiPHP INI Editor and edit the settings for the domain's document root
  • Change the value for zlib.output_compression to Off

zlib.output_compression | Whether to transparently compress pages. If this option is set to "On" in php.ini or the Apache configuration, pages are compressed if the browser sends an "Accept-Encoding: gzip" or "deflate" header.

@bobbingwide

This comment has been minimized.

Copy link
Owner Author

@bobbingwide bobbingwide commented Aug 13, 2019

There's a core TRAC that's been opened for the first ob_end_flush message. https://core.trac.wordpress.org/ticket/22430

A simple fix to prevent the first message is to add a couple of lines at the start of wp_ob_end_flush_all, returning without calling ob_end_flush if zlib output_compression is enabled.

function wp_ob_end_flush_all() {
	if ( ini_get( 'zlib.output_compression') ) {
	    return;
    }
@bobbingwide

This comment has been minimized.

Copy link
Owner Author

@bobbingwide bobbingwide commented Aug 16, 2019

The far-future-expiry-header plugin also produces messages.

Warning: ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression' in C:\apache\htdocs\hm\wp-content\plugins\far-future-expiry-header\far-future-expiration.php on line 73

Notice: ob_start(): failed to create buffer in C:\apache\htdocs\hm\wp-content\plugins\far-future-expiry-header\far-future-expiration.php on line 73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.