magento - PHP ob_gzhandler extra characters -


i have blended website have expressionengine cms magento store. in our ee site, have template call plugin retrieve store cart info. use magento's authentication logged in user magento user.

we want show this:

first

the code in plugin connects magento, gets loggedin user, if logged in , sets number of cart items.

this html plugin supposed return template:

<span class="carticon">(0)</span><a href="http://www.example.com/store/checkout/cart/">my cart</a><span>welcome, mb34!</span><a href="http://www.example.com/store/customer/account/logout/">logout</a> 

but, if enable gzip on expressionengine, err_content_decoding_failed exception because magento doesn't have built-in gzip. not have mod_deflate enabled how ee able gzip? has through ob_gzhandler.

now, if modify plugin use ob_gzhandler this:

ob_start("ob_gzhandler"); echo trim($result); ob_end_flush(); 

i characters @ end of output:

second

any ideas causing , how fix it?

we enabling mod_deflate soon; fix it? mean won't have use ob_gzhandler then, right?

when using ob_gzhandler important don't mix content other encodings. forcing ob_end_flush() may causing buffer terminate before done sending content. simple empty line end of file may causing this. suggest skip ob_end_flush() , let buffer end naturally when php script terminates.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -