zlib compression compromises some functions?

Started by drewactual, January 08, 2018, 02:35:37 PM

Previous topic - Next topic

drewactual

Hi! 

i recently upgraded to http2, added memcache and mamcached, and set up zlib to handle output compression of script- used zgrip to manage compression of text, html, css, js... it worked great and the site screamed...

but...

functions such as 'quote' and 'smfpacks alerts' stopped working.  I get that smfpacks alerts is a vendor issue, but that leaves the 'quote' function on the table for this forum...

running php7 and using 2.0.15. 

i turn the zlib off and boolahkashah- all is well.  it's not like it's saving me all that much in terms of speed, so.. I'm leaving it off... that knocks this post down to the "when we can get to it" priority and i have no problem with that... but maybe somebody who know's this machine knows what to look for right off the tops of their heads?

many thanks, as always... this community is great and i'm sure won't let us down!!!

Arantor

How, exactly, did you configure zlib? Did you let SMF deal with it or did you try to manually configure it in the server (this will end badly)

Are you even sure it actually saved you speed? If in doubt, measure, and not just once.

drewactual

ah.. yup. i configured it. 

zlib.output_compression = On
zlib.output_compression_level = 6
zlib.output_handler = on


so... edit out the last two lines and try again?

thank you!

edited to add:  zlib was marginal by itself, but what it did do was score the site higher on optimization/security scales.  a matter of fact it scored it 100 (for that portion of the test only, 88 overall but mostly due to content ~ads~ served that i don't/can't control)...

Arantor

No, try using SMF's actual settings for this, namely the one about using compression.

drewactual

oh- yup, it's 'checked'...

stupid question: does SMF check if it's available and use it or does it use another function? 

Arantor

If it's checked, SMF should be doing it itself without you touching php.ini. If not, there's about a million reasons it can fail all of which start with going through pretty much every aspect of your server.

That said, try disabling SMF's and leaving your settings in place. It's possible (if a touch unlikely) that it'll work better.

Also, zlib does *nothing* for security. At best it makes the data smaller in transit (at the cost of more server CPU)

drewactual

i'll just leave it to SMF, then... there is another side effect of having it on which isn't SMF's issue but a WP issue (known bug that's been there for several iterations of WP now, concerning flushing.). 

the site i used to test was a speed/optimization/security check site... the output compression had it's own little field (and called zlib out as the function) for that portion... it wasn't just a security check, in other words.. it was a optimization and speed test too. 

Arantor, as always- thank you!  this one can be marked resolved!

Advertisement: