I have added this code to the top of my page and it is executed when a user login.
<?php
$lifetime=86400;session_start();setcookie(session_name(),session_id(),time()+$lifetime,"/","","TRUE","TRUE");
?>
My intention is to increase the session life time to +1 day since the last access. But for some reason this is not working, session expires after an indefinite x amount of time even though my browser indicates that the session will expire +1 day when i check the console. I am running my web application on apache and an ubuntu environment. By doing a few search in my info.php file i found this as my local value
session.cookie_lifetime 0
session.gc_divisor 1000
session.gc_maxlifetime 86400
session.gc_probability 1
To my best of knowledge i think ubuntu is doing gabbage collection in the /var/lib/php/sessions folder with cron jobs because i am using windows as a development environment and i don't see any of that happen.
my question is. Have i done anything wrong or am i right to say ubuntu is doing gabbage collection,so it will be advisable to change the session.save_path and if so what is the best way to that esp allowing permissions