开发者

Upping the default timeout for a PHP application

I have a PHP application (GLPI) running on Apache. What is the def开发者_StackOverflow社区ault session timeout and how do I change it?


The default session time is 1440 seconds (24 minutes).

And you can change it through the configuration files php.ini or .htaccess.

Using php.ini,

  session.gc_maxlifetime = 2000;

Using .htaccess,

ini_set( 'session.gc_maxlifetime' , 2000);


You can extend the session timeout to 5 minutes by

ini_set('session.gc_maxlifetime', 5*60);

You can check default session timeout by

echo $default = ini_get('session.gc_maxlifetime');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜