After I store a flexible inside a session (in php), how lengthy will that variable linger for the reason that file? Could it be there until someone unsets the variable or removes the file?

update: so it's session.gc-maxlifetime setting that's occur php.ini file. You should check your setting by calling phpinfo(). Mine is placed to 1440 seconds so 24 minutes. Might have found a duplicate here, although when searching I did not think it is in the beginning due to the wording.

On default it will likely be there 24 minutes. (The default php.ini file setting).

While you said, this is actually the setting: http://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime

Try looking in your php.ini file. It will explain just how lengthy the default session can last.