Login acting weird

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Login acting weird

Post by kanklovitch » 2020-05-22 03:36

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?
Attachments
Login.jpg
Login.jpg (23.52 KiB) Viewed 1223 times

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 869
Joined: 2018-04-01 10:12

Re: Login acting weird

Post by pböttcher » 2020-05-22 19:20

Hi,

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

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-22 19:44

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.
Attachments
Connect.jpg
Connect.jpg (48.94 KiB) Viewed 1183 times

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 536
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login acting weird

Post by jsetzer » 2020-05-22 20:23

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

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-22 21:26

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?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 536
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login acting weird

Post by jsetzer » 2020-05-23 10:46

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.

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-24 01:09

Thanks Super Hero!!

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-24 13:48

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.
Attachments
Failed Log In.jpg
Failed Log In.jpg (20.1 KiB) Viewed 1093 times

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-25 02:37

I don not have the same problem working in Xampp on my computer.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 536
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login acting weird

Post by jsetzer » 2020-05-25 03:00

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.

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-26 04:29

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.
Attachments
BOM.jpg
BOM.jpg (38.68 KiB) Viewed 1029 times

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 536
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login acting weird

Post by jsetzer » 2020-05-26 04:42

  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.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 536
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login acting weird

Post by jsetzer » 2020-05-26 04:48

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.

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-26 10:45

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

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-26 13:07

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.
Attachments
Failed again.jpg
Failed again.jpg (37.63 KiB) Viewed 997 times

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 536
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login acting weird

Post by jsetzer » 2020-05-26 13:39

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.

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-26 14:08

Good idea Jan
I will try as soon as I can.

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-26 17:03

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?

kanklovitch
Veteran Member
Posts: 124
Joined: 2019-02-03 17:26

Re: Login acting weird

Post by kanklovitch » 2020-05-26 18:40

Hi
Is it possible that this is an issue the way PHP itself is setup on the server?

Post Reply