Néstor wrote:
I understand this.  Like I said it is not working on PHP 5.1.
I do the session_start()
and then I put the session_id() into my $_SESSION['mysession'];

The problem is that my $_SESSION['mysession'] is empty on php 5.1
when it was not in php 4.1.


Out of curiosity, why do you store the session ID in the session array when session_id() will give you what you are looking for? And then, what does session_id() produce? If that is an empty value then $_SESSION['mysession'] will be empty as well.

Apparently a logs of people where having this problim according to this link:
http://bugs.php.net/bug.php?id=16263

I am reading the above link to see what the answer to the problem is.
I was hoping that some one on this list had seen this problem and
knows the answer.


The answers boil down to two things:
1. Check where the session files are written to and make sure that PHP has full access to that place and that nothing else wipes those files out.
2. Use this:
<?php
session_start();
header("Cache-control: private");

I use sessions extensively in my projects and didn't find that there is any issue. I do set the cache control.

HTH

David
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to