Issues with PHP Session Persistence Post-Server Migration

I’ve migrated PHP web application to a new server and are encountering issues with session persistence. Users are experiencing frequent logouts and session data seems to vanish unexpectedly. Our setup uses PHP 7.4 on an Apache server.

So Far:

  1. I verified session.save_path is writable and accessible.
  2. I checked cookie settings and confirmed headers are sent before outputs.
  3. Ensured no session_id regeneration occurs unexpectedly.

Could this be related to specific server settings or PHP configurations that differ from our previous environment?

Thanx :blush: :blush:

Free hosting is using 8.2.
Check your code?

3 Likes

Can you tell us more about this? Like how often does this data vanish, and how frequently are they logged out?

Cleanup of session storage is controlled by the server, and different server configuration may cause stale session data to be cleaned up sooner or later.

Being logged out after a few hours is pretty normal, but after a few minutes is not.

4 Likes