I want to expire session after 45 minute.
Is there any simple way to that?
Should I change any config in PHP.ini file?
This can be done by using the ini_set function in PHP. Look at this code:
// Get the actual session timeout
$currentTimeoutInSecs = ini_get(session.gc_maxlifetime);
// Set the session timeout
ini_set(session.gc_maxlifetime, 45*60);