how do I find the php session start timestamp
global-variables, php, session, timestamp
Solution
what's wrong with:
if (!isset($_SESSION['started'])) {
$_SESSION['started'] = $_SERVER['REQUEST_TIME'];
}
Problem
I recall reading somewhere recently that you can obtain the server session start-time in timestamp format of the exact time a php session started for a user, but I cannot find this article again. What I do not want is the request time (ie the time the `'REQUEST_TIME'`) or the "current timestamp" as of the execution of `date()` because (if I understand these correctly) they will change for each request and each script execution. What I want is the time that the session was initiated on the server, and this logically can only be one moment in time. There was apparently a was of retrieving this information. Can anyone help?