Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/portal/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/portal/check_gd.php

<?php
echo "<h2>GD Library Check</h2>";

if (extension_loaded('gd')) {
    echo "<p style='color: green;'>✅ GD extension is loaded</p>";
    
    $gdInfo = gd_info();
    echo "<h3>GD Information:</h3>";
    echo "<ul>";
    foreach ($gdInfo as $key => $value) {
        echo "<li><strong>$key:</strong> " . (is_bool($value) ? ($value ? 'Yes' : 'No') : $value) . "</li>";
    }
    echo "</ul>";
    
    // Test image creation
    echo "<h3>Test Image Creation:</h3>";
    try {
        $image = imagecreate(100, 50);
        $white = imagecolorallocate($image, 255, 255, 255);
        $black = imagecolorallocate($image, 0, 0, 0);
        imagestring($image, 2, 10, 10, "Test", $black);
        
        ob_start();
        imagepng($image);
        $imageData = ob_get_contents();
        ob_end_clean();
        imagedestroy($image);
        
        $testImage = "data:image/png;base64," . base64_encode($imageData);
        echo "<p style='color: green;'>✅ Image creation successful</p>";
        echo "<img src='$testImage' alt='Test Image' style='border: 1px solid #ccc;'>";
        
    } catch (Exception $e) {
        echo "<p style='color: red;'>❌ Image creation failed: " . $e->getMessage() . "</p>";
    }
    
} else {
    echo "<p style='color: red;'>❌ GD extension is NOT loaded</p>";
    echo "<p>You need to enable GD extension in php.ini</p>";
}

echo "<hr>";
echo "<p><a href='modules/membership/codes.php'>← Back to Codes</a></p>";
?>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists