This topic is locked

Problem login with dynamic permission phprunner 11.2 built 44228

4/6/2026 08:10:38
PHPRunner General questions
U
unp author

Hej

Jeg anveder phprunner 11.2 built 44228:

Jeg har hidtil brugt hardcoded password i mit projekt.

Nu ønsker jeg at anvende dynamic permission, så medlemmerne i mit projekt kan rette deres egne data.

Jeg har ændret hardcode til database adgang, bruger og password ligger i medlemsdatabasen password er testet med klar tekst
og bcrypt(12) startende med '$2y$'. i 2 nye felter i medlemsdatabasen (bruger og password)

Når jeg logger ind får jeg fejlen: logind fejler?


Enable database authentication
Usernames and passwords are stored in the database table.

Table where users are stored
skf_Medlem
Username field
ml_Bruger
Password field
ml_Passw
Full name field (optional)
ml_Navn
Email field (optional)
ml_Email
User picture field (optional)


Use existing tables
Table prefix
skf_
Create new tables
Table prefix
skf_1
Tables selected:
skf_ugrights
skf_ugmembers
skf_uggroups


Add existing user to Admin group
username
412112781


ml_Bruger varchar(20)
412112781
ml_Passw varchar(250)

$2y$12$reUYlZSvA8kC21kksdNwaOBB9af6VMN71mzuHkatwtbCF/pWR6p3G


skf_ugmembers:
Kolonne Datatype Funktion Nulværdi Værdi
UserName varchar(100)

412112781
GroupID int(11)
-1


skf_uggroups: Er tom


skf_ugrights:

Medlem -1 ADESPIM NULL

skf_Medlem -1 ADESPIM NULL

admin_users -1 ADESPIM NULL


ChatGPT 4/6/2026

It appears you are trying to set up dynamic permissions and user authentication in PHPRunner, but you're encountering issues when logging in. Here are some steps to troubleshoot and resolve the problem:

  1. Check Password Hashing:

    • Ensure that the password stored in the database is indeed hashed correctly with bcrypt. The format you provided ($2y$12$...) looks correct, but make sure that the password hashing function in your login script corresponds with how you are storing passwords. The password should be hashed when a user registers, and during login, you should verify it against the hash using the same bcrypt function.


  2. Database Configuration:

    • Confirm that you have enabled database authentication correctly in PHPRunner. Make sure the table names and field names in your configuration match exactly how they are defined in your database.


  3. User Group Setup:

    • It appears that your skf_uggroups table is empty. This table is typically used to define user groups and their permissions. You may want to add a group (e.g., Admin or User) to this table and then assign your user to this group in the skf_ugmembers table. If there are no groups defined, the login might fail due to lack of permissions.


  4. User Rights:

    • Ensure that the skf_ugrights table is correctly populated with the required rights for the user groups. If the groups are empty or missing required permissions, users may not be able to log in successfully.


  5. Debugging the Login:

    • Check the login process for any error messages. PHPRunner might provide logs or debugging information that could give you more insights into why the login is failing.
    • If you can, try to add some debugging statements in your login code to see what values are being processed (e.g., username and password).


  6. Field Lengths:

    • Verify that the ml_Bruger and ml_Passw fields are appropriately sized to hold the username and password. The varchar(20) for ml_Bruger seems fine, but ensure that it can accommodate the length of usernames you're using.


  7. Case Sensitivity:

    • Remember that username and password checks are case-sensitive. Make sure the username you are entering matches exactly what is stored in the database.


  8. Testing with Plain Passwords:

    • As a temporary troubleshooting step, consider testing with plain text passwords (not hashed) to determine if the issue is with the hashing or the login process in general. If it works with plain text, then the issue is likely with how you are hashing or verifying the password.


  9. PHPRunner Documentation:

    • Review the PHPRunner documentation regarding user authentication and dynamic permissions to ensure that all necessary configurations have been made correctly.



By following these steps, you should be able to identify and resolve the issues with your login implementation in PHPRunner. If the problem persists, consider reaching out to the PHPRunner support community or forums for more specific assistance tailored to your setup.

Sergey Kornilov admin 4/6/2026

It ill be more helpful if you post in English.

J
JimA 4/6/2026

If you have created the password before changing to using bcrypt, you may have to create a new password, use the 'forgotten password'

And now in Danish: hvis din bruger er oprettet for du skiftede til dynamisk og bcrypt så er du nødt til at ændre password før du kan logge ind brug funktionen med glemt password så får du en email med link til ændring af password

U
unp author 4/6/2026

Sorry, here in english:
Hi

I am using phprunner 11.2 built 44228:

I have used hardcoded password in my project so far.

Now I want to use dynamic permission so that the members in my project can edit their own data.

I have changed the hardcode for database access, user and password are in the member database password is tested with clear text
and bcrypt(12) starting with '$2y$'. in 2 new fields in the member database (user and password)

When I log in I get the error: logind fails?

Sergey Kornilov admin 4/7/2026

Can we see a screenshot with the error message?

Also, do you het exactly the same error using plain text and hashed passwords?

U
unp author 4/8/2026

img alt