eddcaton Posted January 25, 2022 Share Posted January 25, 2022 Hey All, I am after some advice on a recent project I am working on. I have a User system that uses Session for logging in. I have it working fine and tested it on IE, Edge, Chrome & Safari. However I have some users (like 10%) that are having issues logging into the system. With the others having no issues at all. Is there anything i should take a look at? Edd Quote Link to comment https://forums.phpfreaks.com/topic/314456-sessions-not-working-for-some-people/ Share on other sites More sharing options...
ginerjm Posted January 25, 2022 Share Posted January 25, 2022 Issues loggin in? That means so many things. First thing would be the code that is gathering the credentials and authorizing them before posting whatever tokens you are using to the SESSION vars. Another question would be - Are these 10% all using the same browser or simply a few users who have difficulty following instructions? Quote Link to comment https://forums.phpfreaks.com/topic/314456-sessions-not-working-for-some-people/#findComment-1593595 Share on other sites More sharing options...
mac_gyver Posted January 25, 2022 Share Posted January 25, 2022 6 minutes ago, eddcaton said: having issues logging in does that mean they are receiving an invalid username/password error when they authenticate themselves or does it mean that they are not being seen as being logged in when navigating around on the site because the login session variable is not working? Quote Link to comment https://forums.phpfreaks.com/topic/314456-sessions-not-working-for-some-people/#findComment-1593596 Share on other sites More sharing options...
eddcaton Posted January 25, 2022 Author Share Posted January 25, 2022 Sorry to be so vague in my previous message. So I spoke with one user today who is using Chrome (which I use) and they said the cannot login. Just nothing happens when the form is submitted. I personally think its people that are struggling this 'new technology'. I have added an auto login after the user has registered, to ensure that they are getting into the 'login area'. Which then will update the 'last_logged_in' field in MYSL. When looking at MYSL it does not show that the 'last_logged_in' has been updated. So it tends to suggest that the users are having some issue somewhere, but I am unsure where! Hope that makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/314456-sessions-not-working-for-some-people/#findComment-1593598 Share on other sites More sharing options...
ginerjm Posted January 25, 2022 Share Posted January 25, 2022 Walk him thru it and see/hear what he is doing. If he is that much of a noob he probably needs a bit of coaching. And FWIW - this is no longer 'new technology'. Perhaps your login script is not clear or not very helpful or not handling user-errors properly. Have you tested your code against user errors of all kinds? Have you discussed this with another user to see what problem they are having? Quote Link to comment https://forums.phpfreaks.com/topic/314456-sessions-not-working-for-some-people/#findComment-1593599 Share on other sites More sharing options...
mac_gyver Posted January 25, 2022 Share Posted January 25, 2022 also, your login form processing code should log information at each failure point so that you know what is occurring. if the username check is failing, log that occurrence. if the password hash is failing, log that occurrence. hopefully, you already have error handling for the database statements that is logging db errors and are you using prepared queries so that any sql special characters in the submitted values won't break the sql query syntax? posting your code would get the quickest, most comprehensive solution. Quote Link to comment https://forums.phpfreaks.com/topic/314456-sessions-not-working-for-some-people/#findComment-1593604 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.