Page 2 of 2
Posted: Tue Aug 21, 2007 12:22 pm
by volka
olog-hai wrote:My cookie or file that keep my session is always deleted when I refresh my page.
The client-side cookie, i.e. no session id is sent to the server and therefore a new session is created?
Or the server-side file that contains the session data?
Posted: Tue Aug 21, 2007 12:38 pm
by olog-hai
My session cookie save path is c:\windows\temp
I deleted all file manually
I go on my home page
a file like sess_kf8djfa8djfa8jasfa8sdfsad8afj8a is created
I logged on my home page.
and the file sess_kf8djfa8djfa8jasfa8sdfsad8afj8a is automatically deleted.
so when I refreshed my page the session isn't reloaded cause the file do not exist anymore.
____________________
I created an empty object and serialize it on my home page, I opened the kind of file sess_kf8djfa8djfa8jasfa8sdfsad8afj8a and the content was not plain text but the whole content is □. If I print_r() my object before serialize it, I see plain text of my whole object. is it normal to not see plain text on that sess_kf8djfa8djfa8jasfa8sdfsad8afj8a file ?
thanks
Posted: Tue Aug 21, 2007 12:42 pm
by feyd
Sounds like your garbage collection routine is running a bit too quickly, possibly... or you have session destruction logic that's being run.
Posted: Tue Aug 21, 2007 12:53 pm
by olog-hai
; Define the probability that the 'garbage collection' process is started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_divisor,
; e.g. 1/100 means there is a 1% chance that the GC process starts
; on each request.
session.gc_probability = 1
session.gc_divisor = 100
this is my config file.
If I change the 1 to 0 what is the impact ?
To answer your second think, I dont implement __destruct() on any of my classes.
Posted: Tue Aug 21, 2007 12:57 pm
by feyd
__destruct() isn't the only thing involved in session destruction however. There can also be header(), setcookie(), session_destroy(), your computer's own settings, even browser settings.