PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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?
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 ?
; 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.
__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.