pascal_22 Posted November 28, 2012 Share Posted November 28, 2012 Hello, After 20 minutes, all my session vars are destroy... i tried a lot of thing but no one work!! If i want to setup to 45 minutes, How and where can i do that? Thanks a lot ! Pascal Quote Link to comment https://forums.phpfreaks.com/topic/271303-how-to-set-the-var-session-max-time/ Share on other sites More sharing options...
MDCode Posted November 28, 2012 Share Posted November 28, 2012 Post the code where you are setting your session variables Quote Link to comment https://forums.phpfreaks.com/topic/271303-how-to-set-the-var-session-max-time/#findComment-1395958 Share on other sites More sharing options...
PFMaBiSmAd Posted November 28, 2012 Share Posted November 28, 2012 I'll assume you mean that without any activity that makes a http request that causes a session_start() statement to be executed that the session variables for any particular visitor disappear? If so, you need to extend the session.gc_maxlifetime value. This must be done before every session_start() statement to have any effect and if you are on a shared web server where everyone is using the default/common session.save_path setting, you will need to make your own session data folder and also set the session.save_path setting to point to your own session data folder in order to get your session.gc_maxlifetime value to apply to your session data files. Quote Link to comment https://forums.phpfreaks.com/topic/271303-how-to-set-the-var-session-max-time/#findComment-1396026 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.