How to set session lifetime in PHP? I Want to set it to forever as long as the request is exist. The request is AJAX. My PHP code that handle AJAX request is:
Prior to PHP 7, the session_start() function did not directly accept any configuration options. Now you can do it this way
86400, ]); ?>
Reference: https://php.net/manual/en/function.session-start.php#example-5976