You are here: Re: General sessions question « PHP Programming Language « IT news, forums, messages
Re: General sessions question

Posted by Jerry Stuckle on 07/12/07 16:22

tomb wrote:
>
>
> 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

Did you do the other things I asked?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация