<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);

echo "<pre>";

echo "🔍 Checking GD and FreeType support...\n";
if (function_exists('gd_info')) {
    $info = gd_info();
    print_r($info);
} else {
    echo "❌ GD extension not loaded.\n";
}

echo "\n🔍 Checking wkhtmltoimage binary...\n";
$path = shell_exec("which wkhtmltoimage 2>&1");
echo "Result: " . ($path ?: "none") . "\n";

echo "\n🔍 Checking shell_exec availability...\n";
if (function_exists('shell_exec')) {
    echo "✅ shell_exec() is enabled.\n";
} else {
    echo "❌ shell_exec() is disabled.\n";
}

echo "</pre>";
