I’m on an apache server, and have GD and Freetype installed:
’--with-gd’ ’--with-freetype-dir=/usr/include/freetype2’ ’--with-ttf’
I’ve verified that GD is working with a test file that creates an image using text, however, veriword.php fails to show an image, and gives no errors.
here’s the test file that is working:
<?php
header("Content-type: image/png");
$im = imagecreatetruecolor(400, 30);
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
$text = 'Testing...';
$font = 'arial.ttf';
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
imagepng($im);
imagedestroy($im);
?>
I’ve scoured the forums and the internet looking for someone with the same problem, but I can’t find anything. I’m not sure what’s going on. Maybe FreeType isn’t installed correctly? I’m not sure how to test this.
Thanks