seanybob Posted October 25, 2009 Share Posted October 25, 2009 Just something I've noticed about the mccodes engine... It seems the 'remember me' option for logging in doesn't (and never has) worked. I've always had users report their cookie dying after a specific amount of minutes on the site, then having to re-login again. I have very little experience with cookies - anyone redone the mccodes cookie? Any tips/hints from people familiar with this part of the mccodes for me? Anyone else have this prob? Quote Link to comment Share on other sites More sharing options...
Velacan Posted October 25, 2009 Share Posted October 25, 2009 RE: McCodes cookie/login issues? Just something I've noticed about the mccodes engine... It seems the 'remember me' option for logging in doesn't (and never has) worked. I've always had users report their cookie dying after a specific amount of minutes on the site, then having to re-login again. I have very little experience with cookies - anyone redone the mccodes cookie? Any tips/hints from people familiar with this part of the mccodes for me? Anyone else have this prob? Yes correct this feature does not work.. I Will look into it in a second. Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted October 25, 2009 Share Posted October 25, 2009 From what Ive understood isnt there the remember me which creates a cookie for the user login details and then the session. Its the session which will then log the players out for inactivity after 15 minutes? Quote Link to comment Share on other sites More sharing options...
seanybob Posted October 27, 2009 Author Share Posted October 27, 2009 Anybody else have some input on this issue? Quote Link to comment Share on other sites More sharing options...
seanybob Posted October 28, 2009 Author Share Posted October 28, 2009 Come now, someone must have resolved the mccode cookie problem by now. This engine has been out for years. ;) Quote Link to comment Share on other sites More sharing options...
Danny696 Posted October 28, 2009 Share Posted October 28, 2009 Well seanybob, your a good coder................ Quote Link to comment Share on other sites More sharing options...
seanybob Posted October 28, 2009 Author Share Posted October 28, 2009 Well seanybob, your a good coder................ Perhaps. But I have very little experience with cookies, and I though I did try to find the error in the mccodes cookie script, I was unable to do so (even after much testing). My strength is not in javascript. Quote Link to comment Share on other sites More sharing options...
Danny696 Posted October 28, 2009 Share Posted October 28, 2009 dont forget to make a session before you make a cookie, i learn that much about cookies. Try http://www.w3schools.com/PHP/php_cookies.asp and http://www.w3schools.com/PHP/php_sessions.asp for php cookies, for js cookies try: http://www.w3schools.com/js/js_cookies.asp Quote Link to comment Share on other sites More sharing options...
seanybob Posted October 30, 2009 Author Share Posted October 30, 2009 What I have found is that all the cookie info stored by the default login.php for mccodes seems completely superfluous. Completely unnecessary, and on my default site weren't even created. The only cookie created was the sessionid cookie, and that was created by session_start() on the authenticate page. So my next question... how to make the session last longer? I would prefer being able to dynamically choose how long the session lasts, but would accept just being able to set the session to last for 7 days. Any info on that? Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted October 30, 2009 Share Posted October 30, 2009 Check this: http://www.webmasterworld.com/forum88/4186.htm However using sessions which last that long is not smart. Think that for each session the server will create normally a temporary file (unless you use DB sessions), the longer the session last the more file you will find on your server. As the files are created in /tmp and most linux server do have an automatic /tmp cleaner, you may get in troubles when the cleaner will delete the session file. So either you will run out of disk space (unlikely unless you have small quotas) or the cleaner will go there and delete the file PHP is relying on as nobody used the file since long enough. If you want to have a login which works for a long time, I would drop the session mechanism all together, and use instead a simply cookie to authenticate the player. You will need however to change all the mechanism used right now which was using the session to something else. Quote Link to comment Share on other sites More sharing options...
seanybob Posted October 30, 2009 Author Share Posted October 30, 2009 dont forget to make a session before you make a cookie, i learn that much about cookies. Can you tell me a bit more about that? I haven't heard that before. If you want to have a login which works for a long time, I would drop the session mechanism all together, and use instead a simply cookie to authenticate the player. You will need however to change all the mechanism used right now which was using the session to something else. I think I'll probably just end up doing that. Quote Link to comment Share on other sites More sharing options...
CrazyT Posted November 8, 2009 Share Posted November 8, 2009 From what Ive understood isnt there the remember me which creates a cookie for the user login details and then the session. Its the session which will then log the players out for inactivity after 15 minutes? Incorrect - By default sessions last 24 minutes. (i think) Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted November 12, 2009 Share Posted November 12, 2009 i removed that feature due to being informed of a security issue involving it, never looked into it after that 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.