Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Location
    Sabara, Brasil
    Posts
    5

    Question Unanswered: Problems with session

    Hello all,

    I use a session to keep a value of login.
    I don't use cookies or specific session.
    My code is this below:

    session_start();
    $_SESSION['IDLOGIN'] = sprintf("%08d",$_GET['edtlogin']);

    and it works all right, but there are times that the value of the 'IDLOGIN' is lost. I don't know why this happens. I use this session to keep other temporary informations but only the 'login' must remain until the program to be closed. Could be something connected with the time of opened session?

  2. #2
    Join Date
    Oct 2002
    Location
    Plymouth UK
    Posts
    116
    After how much time is that your variables are erased. It may the garbage collection within php. Your variables may be seen as garbage and cleaned away. Check your php initialisation file for the following settings (these are my values).

    session.gc_probability = 1
    session.gc_maxlifetime = 1440

  3. #3
    Join Date
    May 2002
    Location
    Sabara, Brasil
    Posts
    5

    Exclamation

    Originally posted by gannet
    After how much time is that your variables are erased. It may the garbage collection within php. Your variables may be seen as garbage and cleaned away. Check your php initialisation file for the following settings (these are my values).

    session.gc_probability = 1
    session.gc_maxlifetime = 1440
    I checked my php.ini file and the configurations are the same of yours. I saw other options that could resolve my problem, but I don't know right.
    They are:

    cache_expire = 180 minutes
    cache_limiter = nocache

    Temporaly, I have forced the user to login again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •