I have experience similar "flakiness" using sessions but in every case
discovered that it was my code that was at fault. In fact this happened to
me recently while I was programming a fairly complex login script. I'd do
print_r($_SESSION) at the top of every page after session_start(); See if
you can pinpoint where the you're losing the data.
----- Original Message -----
From: "Rob Walls" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:29 AM
Subject: [PHP] Session wierdness
> Is it possible to use PHP sessions reliably?
> I get very inconsistent results.
> I register session vars after a password check.
> I use session_start at the top of every file.
> I watch the /tmp directory for session files.
> Within a few random page transitions the session data inside the
> variables gets emptied. (for instance,
> no longer returns the registered variable userid).
> The session file is still there, but the value reported by session_id() is
> different than the sessionid portion of any session filename. At this
> session_destroy doesn't delete the session file either, so apparently it
> doesn't know which session it is really in.
> I've bought two books (Wrox and Vis Quickpro) and neither of these books
> addresses possible session flakiness.
> So, is it my flaky code, IE's cookie hijinks or maybe that PHP is not
> ready to do robust session management?
> BTW: I am using PHP ver 4.0.6 (patched for file upload bug) on
> Any suggestions would be appreciated!
> [EMAIL PROTECTED]
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php