<?php
// Test PHP simple
echo "PHP OK\n";

// Test db_config
require_once 'db_config.php';
echo "db_config OK\n";

// Test connexion GGR
$conn = getConnectionGGR();
if ($conn) {
    echo "Connexion GGR OK\n";
    
    // Test requête simple
    $result = $conn->query("SELECT COUNT(*) as nb FROM utilisateurs");
    if ($result) {
        $row = $result->fetch_assoc();
        echo "Table utilisateurs accessible, nb lignes: " . $row['nb'] . "\n";
    } else {
        echo "Erreur requête: " . $conn->error . "\n";
    }
    
    $conn->close();
} else {
    echo "Connexion GGR NULL\n";
}
?>