|
Posted by tomb on 07/12/07 12:42
Jerry Stuckle wrote:
> tomb wrote:
>> Sjoerd wrote:
>>> tomb wrote:
>>>> What happens to the $_SESSION values? Mine go away.
>>>
>>> Did you call session_start() before doing anything with $_SESSION? On
>>> both the login page and the next page?
>> Yes, absolutely. It's in the include file, so it's called immediately
>> after the database stuff and the session_set_save_handler function
>> call. The $sessid variable is getting a value after session_start(),
>> it's just the $_SESSION object that ends up with nothing in it. I
>> thought this was supposed to maintain the values for this user until
>> the session expires?
>>
>> Tom
>
> But do you call session_start() before ANY output - even white space?
>
> First of all, get rid of your session handler to eliminate one possible
> cause. Then put your session_start() at the very top of the pages - i.e.
>
> <?php session_start();?>
>
> Ensure this is the very first line on your pages with no white space
> before them.
>
> And ensure you've enabled all error reporting in your php.ini file.
>
Yes, I call session_start(). It flows like this:
session_start();
$sessid = session_id();
if(!$sessid)
die("Failed to start session");
It doesn't die, so $sessid is being set with a value. It's just
$_SESSION that has nothing in it. ???
T
Navigation:
[Reply to this message]
|