Fw: [PHP] Session wierdness
| From: | Kevin Stone | Date: | Tue, 18 Jun 2002 19:25:28 +0000 |
| Subject: | Fw: [PHP] Session wierdness | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-102766@lists.php.net to get a copy of this message | ||
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.
-Kevn
----- Original Message -----
From: "Rob Walls" <rob.walls@hill.af.mil>
To: <php-general@lists.php.net>
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
registered
> variables gets emptied. (for instance,
$userid=$HTTP_SESSION_VARS['userid'];
> 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
point
> 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
really
> ready to do robust session management?
> BTW: I am using PHP ver 4.0.6 (patched for file upload bug) on
> Linux/Apache/MySQL
>
> Any suggestions would be appreciated!
> rob.walls@hill.af.mil
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>