Re: Using ob_gzhandler
| From: | Andrew Brampton | Date: | Thu, 04 Apr 2002 14:42:57 +0000 |
| Subject: | Re: Using ob_gzhandler | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91516@lists.php.net to get a copy of this message | ||
Yes before any output is sent to the browser
So I guess before any headers are sent. and maybe before the session_start..
But it doesn't harm you to place it before everything, put it as the first
line if you want to be 100% safe.
If you want to test if your pages are being GZiped then check out:
http://leknor.com/code/gziped.php
Andrew
----- Original Message -----
From: "Daniel Swarbrick" <daniel@pressure.net.nz>
To: <php-general@lists.php.net>
Sent: Thursday, April 04, 2002 2:29 PM
Subject: Re: [PHP] Using ob_gzhandler
> What I'm trying to ascertain is whether it should go before or after
> session_start(), or any other headers for that matter...
>
> "Andrew Brampton" <andrew@bramp.freeserve.co.uk> wrote in message
> news:012401c1dbd9$c4266000$0100a8c0@STUDENT5830...
> I would guess before any output to the browser... so nearer the top the
> better
>
> Andrew
> "Daniel Swarbrick" <daniel@pressure.net.nz> wrote in message
> news:20020404043911.4782.qmail@pb1.pair.com...
> > Can someone please confirm the correct place to call
> > ob_start("ob_gzhandler") in a script? I am using sessions also, and the
> > start of my scripts is like so:
> >
> > <?php
> > require_once("DB.php");
> > include("lib.inc.php");
> >
> > session_start();
> > if ( ! $_SESSION[sess_auth]) {
> > header("location: index.php");
> > exit();
> > }
> >
> > $db = DB::connect($conn_str, TRUE);
> > $db->setFetchMode(DB_FETCHMODE_OBJECT);
> >
> > // rest of script
> > ?>
> >
> >
> >
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>