user6792802
user6792802

Reputation:

How to change session.gc_maxlifetime?

After setting $cfg['LoginCookieValidity'] = 604880; for phpMyAdmin, I'm getting the following warning in phpMyAdmin:

Your PHP parameter session.gc_maxlifetime is lower than cookie validity configured in phpMyAdmin, because of this, your login will expire sooner than configured in phpMyAdmin.

Where do I have to set session.gc_maxlifetime? Is /etc/php5/php.ini the right place for it? Because nano /etc/php5/php.ini shows me a blank file. What's the right syntax to set session.gc_maxlifetime?

Upvotes: 3

Views: 3344

Answers (1)

Paul T.
Paul T.

Reputation: 4917

If you run phpinfo() (in a browser), the output from that will have a setting: Loaded Configuration File that shows the path to the php.ini file that was used (see below). That will be the file to edit.

enter image description here

The setting in the file is a simple number/value change. Search the file for session.gc_maxlifetime as there is other information above that variable in the file.

Upvotes: 2

Related Questions