Page 1 of 1

Not able to Login

Posted: 2024-02-27 15:40
by RonP
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

Re: Not able to Login

Posted: 2024-03-01 13:30
by RonP
Hi,
Any suggestion is welcome

Ron

Re: Not able to Login

Posted: 2024-03-02 13:25
by RonP
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 ?

Re: Not able to Login

Posted: 2024-03-02 17:53
by jsetzer
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.

Re: Not able to Login

Posted: 2024-03-03 13:44
by RonP
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

Re: Not able to Login

Posted: 2024-03-03 13:55
by jsetzer
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.

Re: Not able to Login

Posted: 2024-03-03 14:07
by RonP
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