Problems with the Windows version of XAMPP, questions, comments, and anything related.


Postby ahmed.abdelsamad » 23. June 2011 22:34

Hi All
i am working on a XAMPP
[PHP: 5.3.5]
on localhost
i am trying to Gzip my files.
i am writting this piece of code at the top of my .php file
Code: Select all
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {

But when i check the http headers using firebug the header doesn't show that the data was gzipped and the file size was exactly the same. Do i need to start any certain modules or change anything in the php.ini file ..?!
Thank you in advance
Posts: 1
Joined: 23. June 2011 22:09

Re: Gzipping

Postby Nobbie » 24. June 2011 10:08

1) You dont need you check whether "gzip" is supported by the browser, because ob_gzhandler() automatically checks, if the browser supports gzip. Remove that if-clause.

2) ob_gzhandler requires the zlib extension

3) ... you easily could find that on yourself by reading the original php doc http://www.php.net/manual/en/function.ob-gzhandler.php
Posts: 8621
Joined: 09. March 2008 13:04

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 86 guests