Increase session variable expiration time in PHP

1

I have tried several ways to modify the expiration time of a session session, but none of them has been useful to me. Also try to modify in .ini and stay the same.

I have the system hosted in cPanel. I hope you can help me, Thanks.

    
asked by jose cervantes 25.09.2018 в 21:53
source

1 answer

1

I copy you a website of a forum where they asked the same question, Link

Other link I think it may be useful .

An example of how you can do it is this:

//seteo la vida de la session en 7200 segundos    
ini_set("session.cookie_lifetime","7200");
//seteo el maximo tiempo de vida de la seession
ini_set("session.gc_maxlifetime","7200");
//inicio la session    
session_start();

For more information about the session, do not hesitate to consult the php help

    
answered by 26.09.2018 в 04:04