Currently having an issue I'm yet to get around, it's been on and off and not consistently most of the time. PHP session files are creating themselves but in around 90% of cases, nothing writes into the session file. I'm using PHP 7 with an Nginx web server on Ubuntu.
Here are some images of the file system...
Sessions being created
Inside session files
This is the code for the login function
// Login user
session_start();
$_SESSION['id'] = $row['id'];
$_SESSION['username'] = $row['username'];
$_SESSION['access_token'] = "verified";
// session_write_close();
header('Location: /');
session_write_close
seemed to have no effect on the result of the issue. Along with that all the $row[x]
variables have data with them so that's not an issue.
I've been stuck with this issue for a couple of weeks now with no solution, yet. I've gone through the below topic as well and it's pretty much the same situation.