![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/.cursor-server/data/User/History/-3c30c5c5/ |
<?php
// Debug script to test logo loading
header('Content-Type: text/html');
echo "<h1>Logo Debug Test</h1>";
$logo_path = 'assets/images/og-logo.png';
echo "<h2>File Information:</h2>";
echo "<p><strong>Path:</strong> $logo_path</p>";
echo "<p><strong>Exists:</strong> " . (file_exists($logo_path) ? 'YES' : 'NO') . "</p>";
if (file_exists($logo_path)) {
echo "<p><strong>Size:</strong> " . filesize($logo_path) . " bytes</p>";
echo "<p><strong>Permissions:</strong> " . substr(sprintf('%o', fileperms($logo_path)), -4) . "</p>";
// Test GD loading
if (extension_loaded('gd')) {
echo "<p><strong>GD Extension:</strong> Loaded</p>";
$logo = imagecreatefrompng($logo_path);
if ($logo) {
echo "<p><strong>Logo Loaded:</strong> YES</p>";
echo "<p><strong>Logo Dimensions:</strong> " . imagesx($logo) . " x " . imagesy($logo) . "</p>";
// Test copying to a new image
$test_image = imagecreatetruecolor(200, 200);
$white = imagecolorallocate($test_image, 255, 255, 255);
imagefill($test_image, 0, 0, $white);
if (imagecopyresampled($test_image, $logo, 0, 0, 0, 0, 200, 200, imagesx($logo), imagesy($logo))) {
echo "<p><strong>Logo Copy Test:</strong> SUCCESS</p>";
// Save test image
imagepng($test_image, 'test_logo_copy.png');
echo "<p><strong>Test Image Saved:</strong> <a href='test_logo_copy.png' target='_blank'>test_logo_copy.png</a></p>";
} else {
echo "<p><strong>Logo Copy Test:</strong> FAILED</p>";
}
imagedestroy($test_image);
imagedestroy($logo);
} else {
echo "<p><strong>Logo Loaded:</strong> NO - imagecreatefrompng failed</p>";
}
} else {
echo "<p><strong>GD Extension:</strong> NOT Loaded</p>";
}
} else {
echo "<p><strong>File not found!</strong></p>";
}
echo "<h2>Directory Contents:</h2>";
$files = glob('assets/images/*');
foreach ($files as $file) {
echo "<p>$file - " . filesize($file) . " bytes</p>";
}
echo "<h2>Current Logo Display:</h2>";
echo "<img src='assets/images/og-logo.png' style='max-width: 300px; border: 1px solid #ccc;' alt='Your Logo'>";
echo "<h2>Test OG Image:</h2>";
echo "<img src='create_og_image.php' style='max-width: 300px; border: 1px solid #ccc;' alt='OG Image'>";
?>