Jump to content

How To Set The Var Session Max Time


pascal_22

Recommended Posts

Hello all,

 

I read so much about it today and now i'm lost!

 

I have a problem in somes pages of my website.

 

For example, When a user registered on my web site, it redirect to a page to complete their profile, age, sexe, hubby,activity, and the user should enter a description in their word minimum 100 charactors...

 

Sometime a user can stay in this page over than 30 minutes ..... so when they click on the button to save/create their profile, it's stop working because the max time for var session is reach, so the user is logged out automaticly and all the profile is lost.... so he/she needs to log in and do it again faster....

 

In read that by default, the time is set to 24 minutes.... how can i change it for 30 minutes or 40 minutes.

 

Note that is inactive time.... the user is typing his description but he seam to enter in the inactive time....

 

How can i change it ?

 

Thanks a lot!!

 

Pascal

Link to comment
https://forums.phpfreaks.com/topic/270084-how-to-set-the-var-session-max-time/
Share on other sites

Note that is inactive time.... the user is typing his description but he seam to enter in the inactive time....

 

The server only knows if a user is active or not by receiving requests from them.  Even if someone is actively doing something on your page (typing a bunch, playing some game, reading whatever) if there are no requests being sent to the server they are going to be considered inactive.

 

In read that by default, the time is set to 24 minutes.... how can i change it for 30 minutes or 40 minutes.

 

The setting that controls how old a session has to be before it can be deleted is session.gc_maxlifetime.  You can set this in your php.ini file or using ini_set prior to calling session_start().

 

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.