jshenn Posted November 27, 2019 Share Posted November 27, 2019 We are using a multi-user PHP login system (Simple,Secure PHP) on our website. It has been working perfectly for several years. Recently we added one new user who is having trouble. His account works fine on his work computer but generates a php error on his home computer. I am able to login with his account, no problem. We've created a new account and even tried re-purposing an existing account, all with the same results. The error message on the web page is coming from this code: ``` $('#login').click(function(){ if($('input#username').val() == "" || $('input#password').val() == "") { $('#feedback').removeClass().addClass('error').text('Please enter a username and password!').fadeIn(); return false; } else { $('#loading').fadeIn(); $('#feedback').hide(); $.ajax ({ type: 'POST', url: 'process.php', dataType: 'json', data: { username: $('input#username').val(), password: $('input#password').val() }, success:function(data) { $('#loading').hide(); $('#feedback').removeClass().addClass((data.error === true) ? 'error':'success').text(data.message).fadeIn(); if(data.error === true) { // $('#memberLoginForm').fadeOut(); } else { $('#memberLoginForm').fadeOut(); $('#footer').fadeOut(); $('.link').fadeIn(); location.href = 'protected.php'; } }, error:function(XMLHttpRequest,textStatus,errorThrown) { $('#loading').fadeOut(); $('#feedback').removeClass().fadeIn().addClass('error').text('I\'m sorry but a php error triggered this, check your php log file for more information'); } }); return false; } }); ``` This code is working for 99.9% of our users and even works for the problem user when he is on another pc. Looking for some advise on how to further troubleshoot this? It seems to be a problem specific to his pc. He has taken the pc to a repair shop and they point back to the website. His home pc is running Windows 7. I've looked at the php error log on our web server just after a failed attempt and I am not seeing an error message logged. Quote Link to comment https://forums.phpfreaks.com/topic/309585-troubleshooting-user-login-error/ Share on other sites More sharing options...
requinix Posted November 27, 2019 Share Posted November 27, 2019 The so-called "PHP error" only means that when the browser tried to send the login data to process.php the server responded with some sort of error. Could be so, so many different things going wrong, only some of which are to do with PHP. There's not much you can do unless you can reproduce the problem yourself, or find something in your PHP or server error log. Quote Link to comment https://forums.phpfreaks.com/topic/309585-troubleshooting-user-login-error/#findComment-1571924 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.