<?php
declare(strict_types=1);
header('Content-Type: text/plain; charset=UTF-8');

try {
    require_once __DIR__ . '/../config/DatabaseConnection.php';
    $pdo = DatabaseConnection::getConnection();
    $ok = (int)$pdo->query("SELECT 1")->fetchColumn();
    echo "DB_OK={$ok}
";
} catch (Throwable $e) {
    echo "DB_ERR: " . $e->getMessage() . "\n";
}

echo "SESSION=" . (isset($_SESSION['user_id']) ? 'ON' : 'OFF') . "\n";
echo "HELPER=" . (function_exists('h') ? 'OK' : 'MISSING') . "\n";
echo "VERSION=hotfix-v2\n";