Page 1 of 1

explain php.ini section

Posted: Sat Dec 14, 2002 12:17 am
by soshea
i need a bit of guidance here. it says in the php manual that if the session.cookie_lifetime=0 then the cookie will be deleted when the browser is closed.
so if i have a

Code: Select all

<?php
sessiont start();
?>
and then close the browser after the page. the session cookie should be destroyed.
the kicker is that i tested this and in my /session folder on linux the sess_84934857dsfhsajhasdkjf is still there.
is there any way making sure that the session is deleted when the browser is closed, just like when:

Code: Select all

<?php
session_destroy();
?>
or do i need to set a time on the lifetime like 3600 seconds to destroy the cookie?
any info appreciated!!

Posted: Sat Dec 14, 2002 12:37 am
by soshea
well after reading a bit more will the session.gc_maxlifetime remove the sessions that have not been utilized for a while? or is there something else i need to look at? my main goal is to not have a whole mess of sess_* sitting on my server>
thanx for any info!