dl5ark1 Posted 3 hours ago Share Posted 3 hours ago I am experiencing an issue with generating images using a PHP script from the MyBlitzortung project (https://github.com/tobiasv/MyBlitzortung/tree/master) after moving my website from the old tommy2 server to the new tommy server. The script uses the GD library to render images with text, but after the move, no text is displayed in the images. To investigate, I ran two simple test scripts: gd.php (https://dl5ark.heliohost.org/gd.php): This test creates a blank image with a black background and attempts to display text using a specific TTF font, but only a white rectangle is shown without the text. gd1.php (https://dl5ark.heliohost.org/gd1.php): Similarly, this script also fails to display the text. The PHP script in question (functions_image.inc.php) relies on the GD library with FreeType support to render the text, and the path to the TTF font seems to be correctly configured. The issue persists even though: - FreeType support is enabled on the server. - The font files are present and accessible with appropriate permissions. I kindly request your help to: 1. Verify if the GD library with FreeType is functioning correctly on the new server. 2. Check for any potential issues with the PHP configuration (e.g., paths, library versions, or limitations) that might prevent the text rendering from working properly. I appreciate your assistance in resolving this issue, as it affects the proper functioning of image generation on the website. Wolstech has also tested it and confirms the problem with PHP 6.5 and the GD library (GD is broken): https://helionet.org/index/topic/62191-tommy-upgrade/?do=findComment&comment=279291 . Thank you for your help, best regards! Quote Link to comment Share on other sites More sharing options...
wolstech Posted 3 hours ago Share Posted 3 hours ago Krydos will need to look why GD does not support using fonts/adding text on PHP 5.6. Thanks for making a separate topic for it Escalating... Quote Link to comment Share on other sites More sharing options...
Krydos Posted 2 minutes ago Share Posted 2 minutes ago Copying the script to my account -- which was created directly on Plesk instead of being created on cPanel a millennia ago and then transferred to Plesk -- works fine https://krydos1.heliohost.org/gd.php <?php // Header, um den Bildinhalt als PNG auszugeben header('Content-Type: image/png'); // Erstelle ein leeres Bild (800x200 Pixel) $im = imagecreatetruecolor(800, 200); // Definiere Farben $bg = imagecolorallocate($im, 255, 255, 255); // Weißer Hintergrund $text_color = imagecolorallocate($im, 0, 0, 0); // Schwarzer Text // Fülle das Bild mit der Hintergrundfarbe imagefilledrectangle($im, 0, 0, 799, 199, $bg); // Pfad zur Schriftart $font_path = './DejaVuSansMono-Oblique.ttf'; // Füge den Text hinzu (Schriftgröße 40, X=50, Y=100) imagettftext($im, 40, 0, 50, 100, $text_color, $font_path, 'Hallo, Welt!'); // Ausgabe des Bildes im PNG-Format imagepng($im); // Bild im Speicher freigeben imagedestroy($im); I've lost count of how many times I've encouraged you to reset your account so far. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.