Jump to content

Increase user session time for 10 hours?


jimjack145

Recommended Posts

 

Hi All,

 

I have one web base program. In that they are not using cookies to store user session. If user not make any activity for few minutes (exp: 10 to 15 mins) then that user session get automatically expired.

 

However as i have idea about php. I check into php.ini file. In that they have mentioned

 

1) session.cookie_lifetime  = 0;

2) session.gc_maxlifetime    = 1440;

3) session.cache_expire      = 180;

 

All values are default values. As per above values my session must not get expired till browser close, or 24 minutes.

 

Can any body tell where is the problem? Do any body have other idea to set default value (to increase) for session life time.

 

Any idea or comments welcome.

 

Regards,

Jimi  ???

Link to comment
https://forums.phpfreaks.com/topic/105397-increase-user-session-time-for-10-hours/
Share on other sites

session.cookie_lifetime  = 0; // 0 means when the browser is closed the cookie dies. A number means the cookie will die after specfief amount of seconds

 

If you never want the cookie to be deleted, try this

 

ini_set('session.cookie_lifetime', 157680000);

 

Thanks for your reply.

 

I have main page as an index.php, in which i have mentioned session_start(). will i post your line above this or where will i put your line?

 

Can you tell me why havent php.ini setting considered for my system?

 

Regards,

Jimi

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.