Another Session Question

From: Al (news_at_ridersite.org)
Date: 12/31/03


To: php-general@lists.php.net
Date: Wed, 31 Dec 2003 10:17:19 -0500

There is a little code that worked before my virtual host before they
updated to 4.3.1.

First time the function is called session should be set, subsequent
calls should be skipped.

session_start();

    if($_SESSION['counter_file'] !==$counterFile) //See if
visitor has already been counted for this page
    {$num += 1;
    $_SESSION['counter_file'] = $counterFile;
    }

echo $_SESSION['counterFile'] . ' testxxxxxxxxx ' . $counterFile;

$_SESSION['counterFile'] shows nothing, even the first time through

$counterFile shows just fine.

Al..........



Relevant Pages

  • Deletion Delay XP
    ... Whenever I have to delete files during a session, ... the FIRST time I use a file delete. ... But subsequent and separate file ...
    (microsoft.public.windowsxp.basics)
  • Re: Preventing Postdata when clicking refresh button
    ... the first time, set a Session Item that will be used to identify that the ... Session Item from #1 above, and disallow the action if it is there. ... From some page a.aspx page get in action containg post data. ... Kumar N- Hide quoted text - ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Timing of functions in C#
    ... The first time a method is called it is JIT'd. ... The Just In Time compiler ... will compile the IDL, then will use the compiled version for subsequent ... > slower than any subsequent call. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Reality Check: Session Hijacking
    ... The user is always challenged when he starts to use a secure app, ... > and I don't mean just the first time, I mean each and every time he ... And NOT from the session. ... SSL, then goes to non-SSL pages while the PHP session is kept alive, some ...
    (comp.lang.php)
  • Re: X session messed up after upgrading to fc6. How to reset Gnome.
    ... I also noticed that the first time it logs in and fails, ... I had to change the session to gnome and retry. ... got it working by copying the files from a new user directory. ...
    (Fedora)