Advertisement:

Author Topic: zlib compression compromises some functions?  (Read 315 times)

Online drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
zlib compression compromises some functions?
« on: January 08, 2018, 02:35:37 PM »
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!!!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: zlib compression compromises some functions?
« Reply #1 on: January 08, 2018, 03:10:52 PM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Online drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
Re: zlib compression compromises some functions?
« Reply #2 on: January 08, 2018, 03:19:49 PM »
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)...

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: zlib compression compromises some functions?
« Reply #3 on: January 08, 2018, 03:26:33 PM »
No, try using SMF's actual settings for this, namely the one about using compression.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Online drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
Re: zlib compression compromises some functions?
« Reply #4 on: January 08, 2018, 03:31:16 PM »
oh- yup, it's 'checked'...

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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: zlib compression compromises some functions?
« Reply #5 on: January 08, 2018, 03:33:30 PM »
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)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Online drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
Re: zlib compression compromises some functions?
« Reply #6 on: January 08, 2018, 03:39:40 PM »
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!