[Pmwiki-users] PHP Sessions / Cookies / Authentication / Cache

Thomas -Balu- Walter list+pmwiki-users
Fri Jun 25 11:09:43 CDT 2004


On Fri, Jun 25, 2004 at 09:30:32PM -0700, Steven Leite wrote:
> Now a question.  If I want to create a cookbook recipe that uses
> session, I don't want to declare the session_start( ) function twice.
> It would be nice if the session_start( ) function was in the core of
> pmwiki (whether it's actually used or not), this would take a bit of the
> guesswork out of writing add-on's.

I'd check if the session already was started (e.g. if there is a SID)
and start the session if not.

> I read in the article that session don't use cookies, and how great that
> is because 30% of browsers don't use cookies, and the number is
> increasing because people don't want information stored on their
> computers, etc etc etc.  But when I read the PHP manual, it seems to be
> that using sessions does in fact rely on cookies.  Does anybody know
> better?  I'm not really an expert with php or cookies, so I'm a bit
> confused by the apparently conflicting facts.

As I wrote in my previous mail. The sessions IDs are stored in cookies
unless this is forbidden. In this case you can use a fallback called
"trans_sid" (check the PHP manual) to automatically add the SID to URLs
and forms.

     Balu



More information about the pmwiki-users mailing list