| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/project-slim/tests/ |
Upload File : |
<?php
require_once 'vendor/autoload.php';
// Initialize the database connection
$capsule = new \Illuminate\Database\Capsule\Manager;
$capsule->addConnection([
'driver' => 'pgsql',
'host' => '5.78.70.76',
'port' => '5432',
'database' => 'reporev_db',
'username' => 'reporev_user',
'password' => 'secret123',
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
]);
$capsule->setAsGlobal();
$capsule->bootEloquent();
use App\Models\User;
// Find the most recent test user
$user = User::where('email', 'like', 'test_%@example.com')
->orderBy('user_id', 'desc')
->first();
if ($user) {
echo "Found user: {$user->email}\n";
echo "User ID: {$user->user_id}\n";
echo "Stored password hash: {$user->password_hash}\n";
echo "Is active: " . ($user->is_active ? 'Yes' : 'No') . "\n";
// Test password verification
$testPassword = 'password123';
$isValid = password_verify($testPassword, $user->password_hash);
echo "Password verification result: " . ($isValid ? 'PASS' : 'FAIL') . "\n";
if (!$isValid) {
echo "Creating new hash for comparison: " . password_hash($testPassword, PASSWORD_BCRYPT) . "\n";
}
} else {
echo "No test user found\n";
}