Re: Sessions and headers

From: Date: Wed, 04 Jun 2003 14:09:42 +0000
Subject: Re: Sessions and headers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-150165@lists.php.net to get a copy of this message
> When using PHP sessions, if the user's browser supports > cookies, PHP sets the session id as a cookie (so far as I > understand it). So when trying to use the session ID in a > script, a cookie request is sent to the browser to get the ID > and assigns it to the internal variable $PHPSESSID (again, > so far as I understand it). > My problem is this and I'm hoping someone has come up > with a workaround... > When I try to use the Header() function call (which I do alot > to set the content type such as PDF, doc, xl, etc), I'm getting > errors opening up the file due to previous headers already > having been sent - namely, the header call to get the cookie > value. What errors, exactly? Can you show some examples? I had problems like this with IE over SSL that was solved by changing the session.cache_limiter. Does it work for other browsers at all or is it a PHP error you're getting? ---John Holmes...

« previous php.general (#150165) next »