prepare("SELECT email, password_hash FROM users WHERE email = :email"); $stmt->execute(['email' => 'admin@nordring.test']); $user = $stmt->fetch(); echo "User: {$user['email']}\n"; echo "Hash length: " . strlen($user['password_hash']) . "\n"; echo "Hash starts with: " . substr($user['password_hash'], 0, 4) . "\n"; // Test password $password = 'secret123'; echo "Password to check: '$password'\n"; echo "Password length: " . strlen($password) . "\n"; // Try password_verify $verify = password_verify($password, $user['password_hash']); echo "password_verify result: " . ($verify ? 'TRUE' : 'FALSE') . "\n"; // Try manually echo "Manual check: " . (strpos($user['password_hash'], '$2y$') === 0 ? 'yes, starts with $2y$' : 'no') . "\n"; // Debug: Try a known hash $testHash = password_hash('secret123', PASSWORD_DEFAULT); echo "Test hash for 'secret123': $testHash\n"; echo "Verify test: " . (password_verify('secret123', $testHash) ? 'YES' : 'NO') . "\n";