/    Sign up×
Community /Pin to ProfileBookmark

ob_gzhandler alternative

as far as I have read, ob_start(ob_gzhandler) will return false if a browser does not support compression and will compress the contents of the buffer otherwise. Is there an alternative to this? I have the issue with my wamp saying that there is a conflict between zlib output compression and ob_gzhandler. I still want to compress my data, can i do something like ob_start(zlib_output_compression)? I am a little out of my depth at the moment and really want to understand this issue.
Cheers in advance
Luke

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@SrWebDeveloperDec 11.2009 — In .htaccess in your document root try this:

php_value zlib.output_compression off

Then in your code use ob_start(ob_gzhandler) as you did before. This callback function to ob_start determines what type of content encoding the browser will accept and will return its output accordingly according to php.net.

-jim
Copy linkTweet thisAlerts:
@lukazauthorDec 11.2009 — Thanks Jim I will have a go later and let you know how it turns out.
×

Success!

Help @lukaz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...