Jump to content

[SOLVED] OOPHP user authentication


robcrozier

Recommended Posts

Hi.  I wonder if anyone can advise me on this....

 

Basically, i've got a 'User' class which contains all the relevant methods to log a user in, validate their login status etc....  However, i'm having a few issues with some people (on different machines) being logged out after only 5mins even though the session settings are set to stay alive for 20 mins. 

 

What i want to do is create a login script that does not rely solely on sessions, but also a users last activity in the database.  My current user class uses a 'username' session to collect all data about a user however and if this is not present, the user data cannot be collected and thus the user cannot remain logged in!?

 

Can anyone suggest how i would go about this?

 

Cheers

Link to comment
Share on other sites

Are you on a shared web server and is the session.save_path setting using the default shared folder?

 

If so, one of the other scripts running on the server has probably set a shorter session.gc_maxlifetime. The solution is to set the session.save_path to be to a private folder within your account's folder tree so that your session.gc_maxlifetime setting only affects your session data files.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

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.