Not able to Login

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
User avatar
RonP
Veteran Member
Posts: 222
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Not able to Login

Post by RonP » 2024-02-27 15:40

Hi,

Sometimes I register a "bunch" of new members, kind of service :) however when I create a default password, most of the time the-mail address.
Now I get back that login with that password won't work and the user sees a "Http 500" error

What is the remedy to solve this.

I use a Sql update script

Code: Select all

INSERT INTO `membership_users` (`memberID`, `email`, `signupDate`, `groupID`, `isApproved`, `pass_reset_key`, `pass_reset_expiry`) VALUES
('name','[email protected]','2024-02-26','8','1','NULL','0'),
If I change the password for the user, Admin mode, I get the same result... a HTTP 500 error.
Goes something wrong with the update script?

My AppGini Version is: 23.13
Ron

User avatar
RonP
Veteran Member
Posts: 222
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Not able to Login

Post by RonP » 2024-03-01 13:30

Hi,
Any suggestion is welcome

Ron

User avatar
RonP
Veteran Member
Posts: 222
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Not able to Login

Post by RonP » 2024-03-02 13:25

Hi,
I've some more information:
After I've registred and try to login I get this message, this on my a staging area, however now with AppGini V24.10
Fatal error: Uncaught TypeError: mysqli_fetch_row(): Argument #1 ($result) must be of type mysqli_result, bool given in D:\Xampp\htdocs\ledenhe-v2313\db.php:65 Stack trace: #0 D:\Xampp\htdocs\ledenhe-v2313\db.php(65): mysqli_fetch_row(true) #1 D:\Xampp\htdocs\ledenhe-v2313\admin\incFunctions.php(674): db_fetch_row(true) #2 D:\Xampp\htdocs\ledenhe-v2313\hooks\__global.php(20): sqlValue('UPDATE `members...') #3 D:\Xampp\htdocs\ledenhe-v2313\resources\lib\Authentication.php(234): login_ok(Array, Array) #4 D:\Xampp\htdocs\ledenhe-v2313\resources\lib\Authentication.php(160): Authentication::processPostSignIn() #5 D:\Xampp\htdocs\ledenhe-v2313\lib.php(27): Authentication::signIn() #6 D:\Xampp\htdocs\ledenhe-v2313\index.php(3): include_once('D:\\Xampp\\htdocs...') #7 {main} thrown in D:\Xampp\htdocs\ledenhe-v2313\db.php on line 65
And ONLY by new created members.

Does this ring a bel ?

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

Re: Not able to Login

Post by jsetzer » 2024-03-02 17:53

sqlValue('UPDATE `members...')

I guess in __global.php you may have forgotten the mandatory 2nd parameter in sqlValue function call.

Your IDE (like VSCODE) should already mark this as syntax error.

It seems mandatory since PHP 8.x. There are more error reports here, these days, about problems after updating PHP to 8.x. At least you should find those syntax errors and add 2nd parameter.

Just a hint.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

User avatar
RonP
Veteran Member
Posts: 222
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Not able to Login

Post by RonP » 2024-03-03 13:44

Hi Jetzer,
You might be right.

I've changed the PHP versions to 8.3.3 ; 8.2.16 and 8.0.30 and all of them gave login problems
Finaly with, an outdated !, PHP 7.4.30 it worked.

If I leave this version on my operational website (our member administration is on the same server!) then I use an outdated PHP version as well.
So, that is not so safe I think.

Is there a work-around ?

Ron

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

Re: Not able to Login

Post by jsetzer » 2024-03-03 13:55

Generated code of latest AG works just fine with PHP 8.x. I don't have any problems.

It's just that we have to review our own custom code and add missing mandatory variables.

It takes some work, yes, but it's not that hard to bring your code base up to date.

A modern IDE like VSCODE helps us by showing the files and lines, containing syntax errors.

I cannot recommend using an outdated PHP version for too long.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.14 Revision 1665 + all AppGini Helper tools

User avatar
RonP
Veteran Member
Posts: 222
Joined: 2013-08-27 13:36
Location: Heiloo, The Netherlands
Contact:

Re: Not able to Login

Post by RonP » 2024-03-03 14:07

Okay,
I do have some "custom codes” in some Hook files.
I'll install VSCODE and investigate the files.
Thanks for the fast reply

Ron

Post Reply