I solved the problem after a while, seems it had been
reacently debated in the bug pages within php, to remove
headers which are added by the session_start(); you can
add the following :
ini_set('session.use_cookies', false);
session_cache_limiter('');
Kind regards,
Kim Steinhaug
- - - - - - - - -
www.steinhaug.com
----- Original Message -----
From: "Kim Steinhaug (php list)" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, August 22, 2005 7:01 PM
Subject: [PHP] session_start(), Pragma and Cache-control headers
> Hello,
>
> I'm working on a downbload script which serves M3U
> files (Winamp playlist files) through a PHP file
> like this :
>
> somepath/download.m3u.php?id=2
>
> Then in the PHP script I generate the M3U file, and
> serve up the headers I want. Swell so far, but a
> little problem appears.
>
> The downloads are for members only, and therefor I
> need to check if the user is logged in, I do this by
> sessions and therefore I add a session_start() at the
> start of my file. When I do this some headers are
> added to the file, namely :
>
> Set-Cookie: PHPSESSID=xxx; path=/
> Expires: Thu, 19 Nov 1981 08:52:00 GMT
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
> pre-check=0
> Pragma: no-cache
>
> Theese headers are not needed, and I dont want them
> either, exept I cant seem to get rid of them since I
> need the session_start() in the beginning of the file.
>
> Sure, I could wish for a function unset_potensial_header(pragma);
>
> I guess there are no way to remove theese unwanted headers?
> Yesterday I had to give up another problem, but luckily I
> found the answer here : http://bugs.php.net/bug.php?id=33057
>
> So to sum it up :
> How can I remove the Cache-Control and Pragma headers?
>
> And Im not looking for this answer :
> header('Pragma: ');
> header('Cache-control: ');
>
> The headers are still sendt, exept they are empty, doesnt look
> like a nice sollution for a production environment.
>
> Kind regards,
> Kim Steinhaug
> - - - - - - - - -
> www.steinhaug.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php