Paul
Paul

Reputation: 777

Upping the default timeout for a PHP application

I have a PHP application (GLPI) running on Apache. What is the default session timeout and how do I change it?

Upvotes: 0

Views: 3199

Answers (2)

Adeel
Adeel

Reputation: 615

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');

Upvotes: 0

Pradeep Singh
Pradeep Singh

Reputation: 3634

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);

Upvotes: 1

Related Questions