note 56450 added to function.session-cache-limiter

From: Date: Fri, 02 Sep 2005 22:04:24 +0000
Subject: note 56450 added to function.session-cache-limiter
Groups: php.notes 
Request: Send a blank email to php-notes+get-94676@lists.php.net to get a copy of this message
Andrei Chirila, andrei_chirila at yahoo dot com 12-Jan-2005 09:30 I played about an hour with the download and sessions. yes, to work you'll need session_cache_limiter("must-revalidate"); but this BEFORE session_start() if you want that your download start [IE problem]. Hope someone will need this someday ==== yes, somebody has needed this today :) situation: trying to make a session based download management system complete with user login system that requries an authorized user to download some files, and hide all such files from non-authorized users. the user login, download center, and content management system of the site are all tied in to each other, making troubleshooting this headering stuff a headache. problem: files being served are not accessible thru the regular site, since they are above the htdocs folder in apache, and so headering the file is required, and sessions do not work well with files being headered to the browser. solution: the download center uses ob_start("");, then session_cache_limiter("must-revalidate");, before the session_start();, then everything works well. thank you very much! i was resorting to using a cookie to control this before because i could not figure out how to tie in sessions to the system before! ---- Manual Page -- http://www.php.net/manual/en/function.session-cache-limiter.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56450 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56450&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56450&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56450&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56450&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56450&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56450&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56450&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94676) next »