<?php
header('Content-Type: application/json');
echo json_encode([
    'php_version' => PHP_VERSION,
    'pdo_drivers' => PDO::getAvailableDrivers(),
    'extensions' => get_loaded_extensions(),
    'db_exists' => file_exists('/var/www/api_placa/f7imr6zs30ovzazu/keys.db'),
    'db_perms' => substr(sprintf('%o', fileperms('/var/www/api_placa/f7imr6zs30ovzazu/keys.db')), -4),
    'php_ini' => php_ini_loaded_file(),
    'scanned_inis' => php_ini_scanned_files()
]);
// phpinfo(); // Uncomment if needed, but JSON is better for now
