I have a site where I use session authorization for my users Details are:
PHP Version 7.2.8
session.gc_maxlifetime 604800
session.gc_probability 1
session.gc_divisor 1000
I use the following db.php file for creating a session
$dinamo_session = session_name("dinamo_session");
ini_set('session.cookie_domain', '.DOMAIN_NAME');
#if (isset($_REQUEST[session_name("dinamo_session")])) {
#ini_set('session.cookie_lifetime', 604800);
#ini_set('session.gc-maxlifetime', 604800);
#ini_set('session.save_path', '/var/www/user9357/data/_SESSIONS');
session_start();
#session_regenerate_id(true);
#session_write_close();
#}
My users do not complain from their end everything seems to be ok, the only thing is that I see a growing amount of session files with zero sizes (as well as I see normal session files with the real session's data) You can see different lines of code are commented out. I tried to use all of them to avoid creation of these zero size files but that did not help (isset - to check if the session has been created before, session_regenerate_id(true) - to delete the old files) but no luck. I even had to comment out isset as some users complained that they were not able to log in. I also checked that: Opera and Firefox were ok, but Vivaldi browser was not able to login
Any ideas why these zero files are created and how can I stop it?