Answer the question
In order to leave comments, you need to log in
Why is the session not saved?
I save the sessions in the database, take it from there, everything is fine, but when the page is updated, a new session is generated,
with a new session_id ...
as if the cookie storing the session ID is immediately deleted, although I set the lifetime:
session_set_save_handler(...);
ini set...
ini_set('session.gc_maxlifetime',259200);// пробовал и time()+259200
ini_set('session.cookie_lifetime',259200);// пробовал и time()+259200
ini_set....
session_start();
Answer the question
In order to leave comments, you need to log in
session_start() is placed at the very top
, because first you enable the session mechanism, and then you assign them
It's decided.
It turned out that one of the components clears cookies under certain conditions...
And deleted the session identifier, I'm sorry..
Thank you all for your help)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question