I've uploaded my custom PHP website on Hostgator server. My problem is system automatically destroy session and logout after few minutes if no movement on screen.
I've tried by putting gc_maxlifetime and gc_maxlifetime in header but not working. is there any other solution? I would appreciate any ideas.
<?php
ob_start();
error_reporting(0);
session_start();
ini_set(session.cookie_lifetime, 86400);
ini_set(session.gc_maxlifetime, 86400);
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
.
.
.
?>