Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2007
    Posts
    269
    Thanks
    28
    Thanked 0 Times in 0 Posts

    can not kill session

    my php.ini settings

    Code:
    ; After this number of seconds, stored data will be seen as 'garbage' and
    ; cleaned up by the garbage collection process.
    session.gc_maxlifetime = 5
    
    
    ; Document expires after n minutes.
    session.cache_expire = 1
    in spite of this my session does not die after even 2 minutes (in İE & Firefox)

    session_read.php
    PHP Code:
    session_start();
    if (
    $_SESSION["name"]==''){
        echo 
    'no session';
    }else {
        echo  
    session_id()."<br/>" 
        echo 
    $_SESSION["host"]."<br/>" 
        echo 
    $_SESSION["name"] ."<br/>" ;
        echo 
    $_SESSION["zaman"]."<br/>" 
        echo 
    $_SESSION['count']++;

    session_write.php
    PHP Code:
    session_start();
    $_SESSION["host"] = $_SERVER['REMOTE_ADDR'];
    $_SESSION["name"] = "programmingtalk";
    $_SESSION["zaman"] = date(' H:i:s d-m-Y');
    $_SESSION['count'] = 0

    why does not my session die automatically ?

  • #2
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    Just a thought here ... which version of PHP using and which OS is running on your server?

  • #3
    Regular Coder
    Join Date
    Dec 2007
    Posts
    269
    Thanks
    28
    Thanked 0 Times in 0 Posts
    Microsoft Windows XP [version 5.1.2600] + SP2

    * Apache HTTPD 2.2.8 + Openssl 0.9.8g
    * MySQL 5.0.51
    * PHP 5.2.5
    * phpMyAdmin 2.11.4
    * FileZilla FTP Server 0.9.25
    * Mercury Mail Transport System 4.52

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts
    That session will only die after that length of time inactive. You probably know this, but just in case, if you are loading any pages that start the session during that time, the timer starts over.
    If I'm postin here, I NEED YOUR HELP!!


  •  

    Posting Permissions

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