gzip and internal redirect

#1
I have two servers configured the same running Litespeed + PHP 5.6 via Cpanel EA4. All my PHP scripts use ob_start("ob_gzhandler") including my download scripts where I use the X-LiteSpeed-Location header. This works fine on one server, but my other server LiteSpeed doesn't seem to like the ob_start("ob_gzhandler") call and I get a 500 error, although this does not seem to be logging to any error log. I don't have this issue serving downloads via PHP's readfile() on either server.

What might be the cause of the issue? I can work around this by removing the ob_start call, but I'd like to understand why this is happening on one server and not my other. Thanks
 
Last edited by a moderator:
#3
Code:
~# /opt/cpanel/ea-php56/root/usr/bin/lsphp -v
PHP 5.6.40 (litespeed)
same on both servers!

It works with just ob_start(), but ob_gzhandler has worked fine for several years in conjunction with X-LiteSpeed-Location. I'm concerned there is some underlying issue somewhere.

The only difference between the 2 servers is the license I'm using, on the server where this isn't working I am using a trial license (Web Host Professional (2-Worker) (LiteMage Unlimited) ) whereas my other server uses a full license - 1-CPU License (1-Worker). I am migrating over to a new server.

Any ideas what's happening?
 
Last edited by a moderator:

NiteWave

Administrator
#4
It works with just ob_start(), but ob_gzhandler has worked fine for several years
brotli compression is introduced in recent 1-2(?) years in addition to gzip, and now it's default than gzip before.
you can disable brotli in litespeed web admin, to see if ob_start("ob_gzhandler") will be ok again.
 
Last edited by a moderator:
Top