Jump to content
MakeWebGames

McCodes cookie/login issues?


seanybob

Recommended Posts

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?

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
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)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...