Jump to content

[SOLVED] Please help to clearify :)


oceans

Recommended Posts

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)

Link to comment
https://forums.phpfreaks.com/topic/141536-solved-please-help-to-clearify/
Share on other sites

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.

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.

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.

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.

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.

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.