User is logged-in a PHP website > I restart Apache > User needs to log-in again.
How to prevent this? (I don't want user to need to log-in again)
|
|
Storing a session token in an alternate location as a backup would prevent this issue. You could still keep your main information in
You might find some help in this StackOverflow question: best practice for session timeouts and persistent login in php. |
|||||
|
|
Your session data should not be lost just because Apache is shutdown or restarted unless the session data is being stored in memory and not backed up to disk (either by filesystem or database). Otherwise, you could restart the entire server and the session would still persist. Session data is designed to be stored long-term. The only time the session is lost is if:
|
|||||||||
|
|
Made possible by using the right argument with Apache :
Apache will restart without lose current sessions. |
|||
|