Scipol Posted August 23, 2011 Share Posted August 23, 2011 Anyone know how to extend the auto logout time? Quote Link to comment Share on other sites More sharing options...
Anonymous Posted August 23, 2011 Share Posted August 23, 2011 session_set_cookie_params() Quote Link to comment Share on other sites More sharing options...
Scipol Posted August 23, 2011 Author Share Posted August 23, 2011 (edited) That being said, where would i change this at? Edited August 23, 2011 by Scipol Quote Link to comment Share on other sites More sharing options...
Danny696 Posted August 23, 2011 Share Posted August 23, 2011 PHP manual, A.K.A. the link he just put.. Set cookie parameters defined in the php.ini file. The effect of this function only lasts for the duration of the script. Thus, you need to call session_set_cookie_params() for every request and before session_start() is called. So in globals.php Quote Link to comment Share on other sites More sharing options...
Scipol Posted August 23, 2011 Author Share Posted August 23, 2011 epic, thanks guys Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 24, 2011 Share Posted August 24, 2011 Please refer to this, and many others. This function(feature) is useless for the goal you want to reach. Quote Link to comment Share on other sites More sharing options...
Anonymous Posted August 24, 2011 Share Posted August 24, 2011 I refer you again to session_set_cookie_params() and indeed the remainder of the session_xxx function suite. It is far from useless as our talented friend above claims, as many web developers can attest to. The note referred to above was unfortunately written by somebody who failed to understand how session cookies themselves work both at server and client ends. "How do I get results from a MySQL database" may be answered simply by a link to the mysql_query() documentation, however it should be apparent to anybody how has taken the time to at least make a cursory glance at the documentation that mysql_connect(), mysql_close(), mysql_fetch_array(), mysql_free_result() are all important. Likewise in this case - my initial link is a pointer the primary reading point of the documentation - I would expect people to take the time to read further, to try and understand the ins and outs of the tools at their fingertips. Is this not after all a programming forum? If the OP simply can't be arsed to do the work him/herself, then fine - I say go ask Jeeves/Google or whatever your poison is, but don't clutter up the board with dumb requests. If however it is indeed a programming forum, then isn't it better to have a pointer in the right direction - which in turn may lead to the OP learning things that obviously other people here haven't taken the time to. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 24, 2011 Share Posted August 24, 2011 What you say is true. But as you mentioned this is a programming forum, and not a reference guide. Simply referencing one link to another seems inutile. I am aware at how sessions work on both sides, and I can agree on what that person says. The most basic idea of a session cookie is to have the same data on both sides, and that it does. But, he default way sessions are stored on the server side is through usage of files in a certain directory(set by the session save path). Then, something to remember as well with this, is that these files are only seen as usable for a certain period of time. The way PHP works with these session files, is that it only updates it's lifetime when the data within these files are altered, and not in fact when they are accessed. The cookie stored on the client side of things, works on the same concept of lifetime. It only updates when the data in contains is altered, and in PHP, altering client side cookies can only be done my replacing the cookie with other data: this is seen as altering the cookie's contents. Now with that in mind, it is safe to say that this function is almost useless for what it portrays. PHP isn't efficient enough with this by itself, and a user intervention is required if you want a viable solution to set the timeout length of a session. Your method isn't "wrong", it's just not efficient enough for setting the lifetime/timeout of a session. I'd be happy to go into this further, but I think I've made my point clear. Quote Link to comment Share on other sites More sharing options...
Scipol Posted August 24, 2011 Author Share Posted August 24, 2011 grrrrrrrrrrrrr Quote Link to comment Share on other sites More sharing options...
Dominion Posted August 24, 2011 Share Posted August 24, 2011 (edited) grrrrrrrrrrrrr They are trying to help you please don't spam your own thread. Edited August 24, 2011 by Dominion Quote Link to comment Share on other sites More sharing options...
Anonymous Posted August 24, 2011 Share Posted August 24, 2011 Please do go further. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted August 24, 2011 Share Posted August 24, 2011 Please do go further. On which subject? My previous post explains the disadvantages of session_set_cookie_params() clearly. Quote Link to comment Share on other sites More sharing options...
Anonymous Posted August 24, 2011 Share Posted August 24, 2011 User intervention? Efficiency? - and No, your post doesn't explain the disadvantage of sscp(), as I do not see that as a disadvantage. I suspect were I to look at the relevant RFCs covering cookie use and the source for sscp() itself, PHP would be following those guidelines to the letter (although one can always take bets on that). However I've grown tired of this, I can see a perfect solution which uses sscp(), I'm sorry if you think differently. I formerly retract my original statement as apparently - it's not good enough. 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.