increase user session time
Is there a way to increase the session time on the user? It only lasts me 24 minutes.
I tried things like that:
"define('DURACION_SESION','7200'); //2 horas
ini_set("session.cookie_lifetime",DURACION_SESION);
ini_set("session.gc_maxlifetime",DURACION_SESION);
ini_set("session.save_path","/tmp");
session_cache_expire(DURACION_SESION);
session_start();
session_regenerate_id(true); "
But it doesn't work, can someone help me?
-
Hey there! Can you provide us with some more details on where this timeout is happening? I can't think of anywhere in WHM or cPanel where there would be a 24-minute timeout. Is this on a certain page of your website? 0 -
Hello! I'm going to try to explain it, English is not my first language, and I'm kind of new to this. My website uses Cpanel, and I use PHP to start the session, you know, I use the session_start(). The problem is that if the user spends 24 minutes without browsing my site, the session is disconnected. I would like users to be able to have their account active for several days, and if they enter my page, that time will be refreshed. I don't know if this is possible, but I would like to know what possibilities cPanel has. I hope I have answered what you asked 0 -
Hey there! Can you provide us with some more details on where this timeout is happening? I can't think of anywhere in WHM or cPanel where there would be a 24-minute timeout. Is this on a certain page of your website?
I forgot to answer the most important thing, it happens to me on all the pages of my website.0 -
Thanks for the additional details. I'm not sure, but maybe another user more familiar with PHP will comment on this. 0 -
You can modify the php.ini: session.cookie_lifetime = 600 Regards 0 -
You can modify the php.ini: session.cookie_lifetime = 600 Regards
Hi, I tried to access that file, but I can't in CPANEL, do you know why?0 -
Admin/WHM access is required to edit php.ini, not possible in a shared hosting subscription. :)
0
Please sign in to leave a comment.
Comments
7 comments