NYCPHP Meetup

NYPHP.org

[nycphp-talk] Lost Sessions

Chris Shiflett shiflett at php.net
Thu Sep 25 11:11:53 EDT 2003


--- Scott Mattocks <crisscott at netzero.com> wrote:
> When I try to login a user it works fine and all of the session info
> is present at the end of the script. When I click on a link to the
> next page the session is empty. All pages are starting the session
> through an included file. Any ideas as to what is killing my session?

I think you will want to change your perspective a bit about the possible
problems that would result in this behavior. The session may very well be alive
and well, but if the client doesn't properly identify itself on the next
request, PHP will have no idea that there is a session for this client.

So, you want to test for different possibilities:

1. The session is in fact gone for some reason.
2. The client fails to pass PHPSESSID (or whatever you may have named it).
3. Both 1 and 2.
4. Something else specific to your session management mechanism.

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/



More information about the talk mailing list