oceans Posted January 20, 2009 Share Posted January 20, 2009 Can any one give me quick explanation to the following (I read the PHP manual but I got a bit confused): max_execution_time (if set to "0", it is no limit right? What happens if a function in page falls to infinite loop, will this page always be open even if the browser is cutoff by user) session.cache_expire (180 is it minutes? ) session.cookie_lifetime (what is the diff between the above, sounds about the same to me) session.gc_maxlifetime (I could not figure out) implicit_flush (Ideally this is not necessary right, as when the page is closed or transferred, all data pertaining to the current page gets destroyed right) max_input_time (is this client dependent) Quote Link to comment Share on other sites More sharing options...
btherl Posted January 20, 2009 Share Posted January 20, 2009 You might find some useful info in the list of php.ini directives. session.gc_maxlifetime is the time before your server will delete old sessions. session.cookie_lifetime is how long the session cookie lives for in the user's browser. For the session configuration, sessions typically use a cookie, but they also store data on the server. Some options relate to the cookie, others to the data. Quote Link to comment Share on other sites More sharing options...
machupicchu Posted January 20, 2009 Share Posted January 20, 2009 max_execution_time I understand is how long the script can run for until it is terminated. if the client loses connection or goes to another page then the script execution is terminated right there in my understanding Quote Link to comment Share on other sites More sharing options...
corbin Posted January 20, 2009 Share Posted January 20, 2009 In some cases, the request will be finished, meaning script execution will continue. Quote Link to comment Share on other sites More sharing options...
oceans Posted January 22, 2009 Author Share Posted January 22, 2009 Thanks, I think Session values are stored in server, and not in client (Please confirm this). "session.cache_expire" what does this means, it appears very close to "session.gc_maxlifetime" session.cache_expire 180 180 session.cookie_lifetime 180 180 session.gc_maxlifetime 1440 1440 I am confused with the units are they seconds or hours? Because for these values, I see thousands of entry of session numbers (when I list the active session values), while the traffic is very low, which means the session numbers are not removed. I am greatful, Can you please explain. Quote Link to comment Share on other sites More sharing options...
btherl Posted January 22, 2009 Share Posted January 22, 2009 The list of php.ini directives explains which are in minutes, seconds, etc. Click on the directive to get an explanation of how it works. If you want to clear out old sessions earlier, you can reduce gc_maxlifetime. That affects how long php waits before clearing those files on the server. And yes, session data is stored on the server. But the session cookie which identifies the client is stored on the client. Quote Link to comment Share on other sites More sharing options...
oceans Posted January 26, 2009 Author Share Posted January 26, 2009 Dear btherl, May I ask you a personal favour? The more I read, the more I get confused, probably because, I am facing a situation right now. (My old session ID entries are never destroyed, they keep on accumulating) My first page will find & make a unique session ID at run time. This session ID will be carried to all the pages till the user walks away from my domain. All I want is, the session ID in the server & the client to be destroyed after walking away from my domain or after a 20 minutes of idle connection. Please suggest me All the typical session directives (and its typical values) for me. I really appreciate your help. Quote Link to comment Share on other sites More sharing options...
oceans Posted January 27, 2009 Author Share Posted January 27, 2009 Btherl could be busy. Can any one chip in please. Quote Link to comment Share on other sites More sharing options...
uniflare Posted January 27, 2009 Share Posted January 27, 2009 pretty sure u can set the cookie lifetime to 0, in which case the cookie should be destroyed once the browser is closed. the sessions will still exist though, but unless someone knows an old session identifier string, they wont get any other users data. you can do what natwest does, set an extremely low gc_maxlifetime (10 minutes?), that way if they dont click the page in 10 minutes the session gets destroyed. This is more for security though, if your not worried about that harsh a security i reall dont think it matters that much. You have all those id's active because your cleanup time (maxlifetime) is set to several hours, 2.2 i think. There can only be a maximum number of session id's, as i think if the session id's are all taken, it will replace the session thats oldest, etc. Unless your storing large amounts of information in the session variables, it really should not be a problem. As for a "Standard" value of these ini settings, i really dont think there is one, it is down to preference and situation. Hope this helps. Quote Link to comment 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.