1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Rep Power
    I have some problem with sessions.


    When I see my counter based on sessions. Let's look at my /tmp:
    su-2.03# ls /tmp

    This file is not deleted any more almost two days Though in options of php.ini we could see:

    session.save_handler = files
    session.save_path = /tmp
    session.use_cookies = 1
    session.name = PHPSESSID
    session.auto_start = 0
    session.cookie_lifetime = 0
    session.cookie_path = /
    session.serialize_handler = php
    session.gc_probability = 1
    session.gc_maxlifetime = 1440
    session.entropy_length = 0
    session.cache_limiter = nocache
    session.cache_expire = 180

    What's wrong? Btw, give me url where I could read about sessions (examples)..etc... Please...

    Sorry 4 my bad english.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Rep Power
    I think you need to set session.cookie.lifetime to null instead of 0... but i could be wrong as i haven't got experience of using php.ini to set cookie parameters...
  4. #3
  5. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Niagara Falls (On the wrong side of the gorge)
    Rep Power
    No, it doesn't have anything to do with the cookie lifetime. The two relevent lines are:

    session.gc_probability = 1
    session.gc_maxlifetime = 1440

    The maxlifetime is 1440 seconds, but with a probability of only 1 (1%) that means there is only a 1% chance that old sessions will be cleaned up whenever a session_start() is called. Meaning that the overhead of cleanup is limited instead of being done constantly. If you have a low volume website you could increase the probability that cleanup will occur.

Similar Threads

  1. Why do sessions dissappear when entering a ssl webpage
    By cuboctahedron in forum PHP Development
    Replies: 3
    Last Post: July 2nd, 2003, 08:43 PM
  2. multipage form: sessions or hidden fields?
    By Ssy in forum PHP Development
    Replies: 7
    Last Post: June 24th, 2003, 10:20 AM
  3. sessions save path
    By sharky121 in forum PHP Development
    Replies: 5
    Last Post: March 25th, 2003, 11:50 PM
  4. Intro to sessions?
    By spackbace in forum PHP Development
    Replies: 7
    Last Post: September 15th, 2002, 09:22 PM
  5. Creating user sessions w/out using sessions
    By marron79 in forum PHP Development
    Replies: 5
    Last Post: September 13th, 2002, 05:16 PM

IMN logo majestic logo threadwatch logo seochat tools logo