🔍 Login System Debug

Step 1: Configuration Files

✓ config/config.php exists
✓ config/database.php exists
✓ includes/functions.php exists

Step 2: Database Connection

✓ Database connection successful
Server Version: 8.0.42
Connection Status: Localhost via UNIX socket

Step 3: Users Table Structure

✓ Users table exists
FieldTypeNullKey
idintNOPRI
chama_group_idintNOMUL
usernamevarchar(50)NOUNI
emailvarchar(100)NOUNI
password_hashvarchar(255)NO
full_namevarchar(100)NO
phonevarchar(20)YES
roleenum('Super Admin','Admin','Manager','Treasurer','Secretary')YESMUL
permissionsjsonYES
avatarvarchar(255)YES
last_logintimestampYES
login_attemptsintYES
account_locked_untiltimestampYES
password_reset_tokenvarchar(100)YES
password_reset_expirestimestampYES
two_factor_secretvarchar(32)YES
two_factor_enabledtinyint(1)YES
statusenum('Active','Inactive','Locked')YESMUL
created_attimestampNO
updated_attimestampNO
✓ password_hash column found

Step 4: Existing Users

✓ Found 1 user(s)
IDUsernameEmailRoleStatus
1adminadmin@chamagroup.comSuper AdminActive

Step 5: Test Authentication with Sample User

Testing with username: admin

✓ User record retrieved successfully
User Data:
id: 1
chama_group_id: 1
username: admin
email: admin@chamagroup.com
password_hash: [HIDDEN - 60 characters]
full_name: System Administrator
phone: +254700000000
role: Super Admin
permissions: ["all"]

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/vxjtgclw/chama.zuri.co.ke/debug_login.php on line 168
avatar: last_login: 2025-12-06 09:01:40 login_attempts: 0
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/vxjtgclw/chama.zuri.co.ke/debug_login.php on line 168
account_locked_until:
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/vxjtgclw/chama.zuri.co.ke/debug_login.php on line 168
password_reset_token:
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/vxjtgclw/chama.zuri.co.ke/debug_login.php on line 168
password_reset_expires:
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /home/vxjtgclw/chama.zuri.co.ke/debug_login.php on line 168
two_factor_secret: two_factor_enabled: 0 status: Active created_at: 2025-09-11 19:00:28 updated_at: 2025-12-06 09:01:40
Password Hash Info:
Length: 60 characters
Format: bcrypt (correct)

Password Verification Test

Testing common passwords against this user:

✓ Password 'admin123' MATCHES!
✗ Password 'password' does not match
✗ Password '12345678' does not match
✗ Password 'admin' does not match
✗ Password 'test123' does not match

Step 6: Session Configuration

Session Status: Not Active ✗
Session ID: None
Session Save Path: /var/cpanel/php/sessions/ea-php83
✗ Session not active

Step 7: Test authenticateUser() Function

✓ authenticateUser() function exists

Test Login



Step 8: Login Page Check

✓ index.php exists
✗ index.php does not call authenticateUser()
✗ index.php does not call session()->login()

📋 Summary & Next Steps

✓ All Checks Passed!

The system appears to be configured correctly.

If login still doesn't work, try the test login above to see the exact error.


Debug complete at 2025-12-06 21:42:09

Go to Login Page