I have an upload form that takes a user about 30 min. to complete. The whole time they’re idle on this page. I use the ini_set() function. You can see the top of the upload page here:
<?php
session_start();
ini_set('session.gc_maxlifetime',10080);
?>
What keeps happening is if a user is idle for 30 or more min. the data gets truncated and the User_id is recorded as a NULL value. I’m completely baffled how this is happening. I initially set the maxlifetime in the php.ini but that overloaded the cached session data. So, I’m just using ini_set. Why would the data be getting messed up and the user_id not be getting recorded. Note: if you do the form fast enough there’s no issues.
You should use
ini_set()before thesession_start().