Hi All,
I want to set session time to all users of 10 hours. How will i set this time into php.ini file?
However php.ini having default values for all session variable.
Please suggest advice for the same.
Regards,
Jimi
Increase user session time for 10 hours?
Moderator: General Moderators
-
jimjack145
- Forum Newbie
- Posts: 3
- Joined: Wed May 14, 2008 2:51 am
Re: Increase user session time for 10 hours?
This should be in PHP Code.
In your php.ini the sessioon.gc_maxlifetime controls how long a session lasts until it expires in seconds so 10 hours in seconds == 36000
In your php.ini the sessioon.gc_maxlifetime controls how long a session lasts until it expires in seconds so 10 hours in seconds == 36000
Code: Select all
session.gc_maxlifetime = 36000
-
jimjack145
- Forum Newbie
- Posts: 3
- Joined: Wed May 14, 2008 2:51 am
Re: Increase user session time for 10 hours?
Hi lafever,
Thanks for your reply.
However in my php.ini file a session.gc_maxlifetime have default value as 1440 it mean session will get expire after 24 mins.
Other session variables have default value as it is. Example:
1) session.cookie_lifetime = 0 (ifetime in seconds of cookie; or if 0, until browser is restarted)
2) session.cache_expire = 180 ; document expires after n minutes
Will i need to change above variable values?
I got confused between two variable
1) session.cookie_lifetime and 2) session.gc_maxlifetime
Thanks for reply. I will do need full changes at my end and reply you soon.
Regards,
Jimi
Thanks for your reply.
However in my php.ini file a session.gc_maxlifetime have default value as 1440 it mean session will get expire after 24 mins.
Other session variables have default value as it is. Example:
1) session.cookie_lifetime = 0 (ifetime in seconds of cookie; or if 0, until browser is restarted)
2) session.cache_expire = 180 ; document expires after n minutes
Will i need to change above variable values?
I got confused between two variable
1) session.cookie_lifetime and 2) session.gc_maxlifetime
Thanks for reply. I will do need full changes at my end and reply you soon.
Regards,
Jimi
-
jimjack145
- Forum Newbie
- Posts: 3
- Joined: Wed May 14, 2008 2:51 am
Re: Increase user session time for 10 hours?
Hi lafever,
Thanks for your help. My problem has solved.
In my php.ini file i have changed a variable value of "session.gc_maxlifetime= 36000".
Regards,
Jimi
Thanks for your help. My problem has solved.
In my php.ini file i have changed a variable value of "session.gc_maxlifetime= 36000".
Regards,
Jimi