1. You load a page, its suffix is php, apache loads php engine to execute it
2. php engines decides if it is time to clean session cache - the probability is taken from session.gc_probability (in %)
3. If yes, it checks each session file's modification time, and if it is old, removes it
From this you can see that you need to load some php pages to have a chance to see the files removed. If you want them to be removed for sure, set session.gc_probability to 100 and load a php page.
Shaun van den Berg wrote:
Hi,
sorry i can reply in newsgroups , something is wrong !
Anyway , im doing everything local on my machine , so when i test php in my browser i use apache to interpret it , i changed the php.ini file in my winnt directory - session.gc_maxlifetime to 15 secs (it was 1440) but the session variables in my tmp file (on my machine cause its local, file name is sess_3zdfa4blahblah) still exists after i close my browser without login off and i wait for 15 secondes , but nothing happens ?
Whats wrong !
Thanks Shaun ----- Original Message ----- From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Shaun van den Berg" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2003 12:08 PM Subject: Re: [PHP] sessions
The session file will be deleted automatically by the garbage colectorsession.gc_maxlifetime
after certain amount of time, specified in php.ini by
Shaun van den Berg wrote:to
Hi,
Im working on a site where the user logs in , if username and password
matches with uname and pword in database then he is a valid user.
I then start a session with session_onstart() and have a variable for his
username and for his permissions ! (these variables are stored on server)
Once he entered the secrure area , there is a logoff button for the user
log off ! the logoff code looks like
(<?php
session_start(); $name = session_name(); session_unset(); session_destroy(); setcookie($name,"",-3600); print("<script language='javascript'>self.close();</script>"); ?> )
the above code deletes the cookie on the clients computer + the session variables on the server !
finally , here is my question ! If the user does not logoff , but simply closes the browser , the cookie on his computer will be deleted , but the session variables on the server will still be there ! How do i delete this ?
Thanks a bunch !
Shaun
-- Novtel Consulting Tel: +27 21 9822373 Fax: +27 21 9815846 Please visit our website: www.novtel.co.za
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php