Page 1 of 1

Login acting weird

Posted: 2020-05-22 03:36
by kanklovitch
Hi Guys
I have a strange problem. My login is acting weird. Previously I was told on the forum that when I got this message I should delete my config and setup files and it would reset. That worked fine until recently, now after I logout and try to login in a little later I get this message again every time. The only way around it now is to delete my config file and start over. Any ideas Super Heroes?

Re: Login acting weird

Posted: 2020-05-22 19:20
by pbottcher
Hi,

can you login once you reset the config ? Do you have anything that update your membership table?

Re: Login acting weird

Posted: 2020-05-22 19:44
by kanklovitch
Hi
When I try to log back in it always says "Your previous log in attempt failed". I than have to delete my config and I always have to reconnect with my database. I am not sure what you mean with - Do you have anything that update your membership table? Since I built my application awhile back I have only used on my computer and everything worked normal. The problem has arisen when I have moved my app to the internet.

Re: Login acting weird

Posted: 2020-05-22 20:23
by jsetzer
Just a stupid idea:
Can you please check if there is any php file saved as UTF8 WITH BOM.

I recently had strange login problems after uploading to linux server. Worked perfectly before on windows. The reason was my customized language.php file which had BOM mark as first three (invisible) characters. Saved it as UTF8 (without BOM) and uploaded to server. Then login worked perfectly.
Best,
Jan

Re: Login acting weird

Posted: 2020-05-22 21:26
by kanklovitch
Sorry, I am a bit slow with this. Are you saying anyone of my files might have been saved somehow as UTF8 WITH BOM? How do I checked that? Does it have a different extension or is it in the code somewhere in one of my files?

Re: Login acting weird

Posted: 2020-05-23 10:46
by jsetzer
Yes. At least that was a problem I had about three weeks ago. Don't know if this will fix your problem.

No, it does not have a different extension. It is also .php (in my case).

I have written a php script which can crawl and show utf8+bom files. Gonna send a download link next Monday.

Re: Login acting weird

Posted: 2020-05-24 01:09
by kanklovitch
Thanks Super Hero!!

Re: Login acting weird

Posted: 2020-05-24 13:48
by kanklovitch
I have two applications on the internet, both are doing the same thing. I have to delete my config file on both in order to connect to the data base.

Re: Login acting weird

Posted: 2020-05-25 02:37
by kanklovitch
I don not have the same problem working in Xampp on my computer.

Re: Login acting weird

Posted: 2020-05-25 03:00
by jsetzer
Maybe I did not understand the last post. Definately you must not overwrite your remote (serverside) config.php file by your local config.php file when you are uploading new files to your server. The database credentials and other parameters will be different in most cases. Usually you will not connect your serverside application with your localhost development database.

Re: Login acting weird

Posted: 2020-05-26 04:29
by kanklovitch
Hi Jan
Sorry I don't understand. After I make changes on my computer with Xampp I upload all of the files to the server. Isn't that what I am supposed to do?

When I ran your bom.php file this is what I got. After I deleted the files the problem did not go away, I am still getting the "Your previous login attempt failed. Try again" message so I have to delete my config files to reconnect to the database. I am out of me league totally on this.

Re: Login acting weird

Posted: 2020-05-26 04:42
by jsetzer
  1. The output of my bom.php script means:
    There is no PHP file saved as UTF8 with BOM mark on your server.
    So, this is not the reason for your login problem.
  2. You must not overwrite config.php when uploading your updated local files to your server
    Your serverside config.php contains database connection parameters for connecting to your serverside database. If you overwrite your serverside config.php by your local config.php this means, you are overwriting your serverside database-configuration parameters by local configuration parameters. You will not be able to login into your serverside database when the (overwritten) serverside config contains local database parameters.

Re: Login acting weird

Posted: 2020-05-26 04:48
by jsetzer
Never forget to BACKUP important files

It seems as if you have already overwriten your serverside config.php.

So maybe easiest would be deleting config.php on your server AND deleting setup.md5 on your server. Then start over with a fresh setup by opening the application in your browser. This should show the setup-page and you will be able to configure your serverside environment again.

Re: Login acting weird

Posted: 2020-05-26 10:45
by kanklovitch
Hi
OK, I think I am doing exactly what you are saying. I only uploaded my application once from my local drive to the server, I have never over written my config file on the server from my local drive. Ever since this problem started I have tried both deleting config.php by itself and sometimes deleting both config.php and setup.md5 on the server to start fresh. I just tried it now and after I logged out I was able to log back in with no problems. What has been occurring these last few days when I come back to my computer after a few hours or perhaps over night when I try to login again I am getting the message "Your last login failed". I realize this sounds strange but in the mean time I make absolutely no changes to my application or even look at it, I must have deleted both files for well over a dozen times with the same result, I can log in right away after I log out but when I go away for a few hours and try to login in I get the message. As I just wrote these last few words I logged out and back in without any problems. I will now logout and leave it alone for a few hours and report back.

I really appreciate your patience Jan, as Ahmed always says - stay tuned!!

Re: Login acting weird

Posted: 2020-05-26 13:07
by kanklovitch
Here it is less than an hour later and I am trying to login for the first time after successfully logging in last time. I am getting the same message again. This has been going on for days, I delete my config and setup files, successfully log in and everything looks fine, awhile later I come back to login and I get the previous login attempt failed. I am totally confused.

Re: Login acting weird

Posted: 2020-05-26 13:39
by jsetzer
I know there are problems in PHP with login, if there is any (!!!) content-output before session_start. Even a blank too much in the beginning of a template and even invisible characters (like BOM characters) can cause trouble with session handling.

I'm wondering where your "the really big question" header comes from. You should remove it for testing purposes and really try with bare AppGini generated code to narrow it down.

Maybe you can rename you hooks files temporarily or comment out everything in hooks.

Re: Login acting weird

Posted: 2020-05-26 14:08
by kanklovitch
Good idea Jan
I will try as soon as I can.

Re: Login acting weird

Posted: 2020-05-26 17:03
by kanklovitch
Oh boy, same problem. I renamed both my footer-extras and header-extras file and the dreaded Try again message kicks in again. Does anyone else have this issue?

Re: Login acting weird

Posted: 2020-05-26 18:40
by kanklovitch
Hi
Is it possible that this is an issue the way PHP itself is setup on the server?