Closed sviluppomania closed 1 year ago
This is usually caused by another plugin not closing the output buffer. Can you check if the error is gone if the other plugins are deactivated?
Hi @rlankhorst ,
I have deactivated all plugins but none cause this error. There is a similar error with WordPress:
Notice: ob_end_flush(): Failed to send buffer of zlib output compression (1) in /wp-includes/functions.php on line 5279
Also the WordPress error remained by disabling all plugins.
Can you try increasing the memory on your website by adding this to your wp-config.php?
define( 'WP_MEMORY_LIMIT', '256' );
Already done, but the error remains.
Then there might be something specific on your hosting environment, as we haven't been able to reproduce this yet.
I will keep an eye out if I can find an issue like this so I can debug it. Most likely it's something in the server setup.
I noticed other users reported the same problem previously, here: https://wordpress.org/support/topic/problems-ob_end_flush-failed-to-send-buffer-of-zlib-output-compression-0/
Theme: Grace Mag v1.1.3 ( https://it.wordpress.org/themes/grace-mag/ )
Version PHP: 8.1.12
On the site I use the WP Fastest Cache plugin ( https://it.wordpress.org/plugins/wp-fastest-cache/ ) and Gzip is also set.
zlib.output_compression is enabled on the server, I tried disabling it too but the error remains.
That user resolved it by upgrading php, so was caused by something else.
Did you also try switching to a default wp theme?
Yes, I tried to switch to a default WP theme (e.g. the latest plugin: Twenty Twenty-Three ), but the same Front-end error reappears with WP Debug active.
@rlankhorst
Looking for the error, some recommend replacing:
ob_end_flush();
with
remove_action( 'shutdown', 'wp_ob_end_flush_all', 1);
The shutdown hook is too late for our purposes, which also means the error already has occurred when the shutdown hook triggers. So this wouldn't work.
Additionally, if there is a difference between opening buffers and closing buffers, which this code suggests, it is better to fix that than to try closing all buffers with brute force.
It might be that your hosting provider is opening or closing a buffer from Complianz.
Hi @rlankhorst , recently, after the update, these new ones also appeared:
PHP Warning: Undefined array key 2 in /plugins/complianz-gdpr/assets/vendor/mpdf/mpdf/src/Mpdf.php on line 12720
PHP Warning: Undefined array key 2 in /plugins/complianz-gdpr/assets/vendor/mpdf/mpdf/src/Mpdf.php on line 12746
@sviluppomania what php version are you on? This is from the MPDF library, which we use, but don't maintain ourselves.
PHP 8.1.13
The current MPDF version is 8.0.5, full php 8.1 support is as of v8.0.13. I've created a version with v8.0.13 here: https://github.com/Really-Simple-Plugins/complianz-gdpr/tree/mpdf-update
It's a tightrope we walk on, as the 8.1.3 version does not support 7.4 anymore.
We'll run our php support tests, if it is accepted, it will get merged in one of the coming updates.
The current MPDF version is 8.0.5, full php 8.1 support is as of v8.0.13. I've created a version with v8.0.13 here: https://github.com/Really-Simple-Plugins/complianz-gdpr/tree/mpdf-update
It's a tightrope we walk on, as the 8.1.3 version does not support 7.4 anymore.
We'll run our php support tests, if it is accepted, it will get merged in one of the coming updates.
Hi, Will this fix be added to the main branch?
Yes, it will get tested and merged, I expect about 4 weeks until release.
These reappeared:
PHP Warning: Undefined array key 2 in /plugins/complianz-gdpr/assets/vendor/mpdf/mpdf/src/Mpdf.php on line 12720
PHP Warning: Undefined array key 2 in /plugins/complianz-gdpr/assets/vendor/mpdf/mpdf/src/Mpdf.php on line 12746
@sviluppomania this branch has not been merged yet, as it is still in the testing fase.
Questi sono riapparsi:
PHP Warning: Undefined array key 2 in /plugins/complianz-gdpr/assets/vendor/mpdf/mpdf/src/Mpdf.php on line 12720 PHP Warning: Undefined array key 2 in /plugins/complianz-gdpr/assets/vendor/mpdf/mpdf/src/Mpdf.php on line 12746
Hi @rlankhorst , A few days ago these PHP Warnings appeared, with the branch closed have they been fixed?
Thanks. Best regards,
The mpdf library has now been updated to the highest version that is still compatible with php 7.2. We can't update above that at this point. As these are just warnings you can ignore them.
When support for 7.2 can be dropped we can update again.
There is no compatibility with PHP 8.x.x. ?
See https://github.com/mpdf/mpdf
php 8.2 is supported, but the latest versions do not support 7.2 anymore, so we can't update yet. We have to wait until 7.2 is dropped.
Hello, I encountered this warning:
Notice: ob_end_flush(): Failed to send buffer of zlib output compression (1) in /plugins/complianz-gdpr/class-cookie-blocker.php on line 428
Is there a solution to this warning?
Thank you.
Best regards