I have some problems with rendering text using imagettftext(); Somehow it just shows filled rectangles. No errors at all. http://postimage.org/image/k61c8xi0n/
Here's the code, nothing strange. Font path works.
<?php
header("Content-type: image/png");
$template = imagecreatefrompng("template.png");
imagealphablending( $template, false );
imagesavealpha( $template, true );
$white = imagecolorallocate($template, 255, 255, 255);
imagettftext($template, 20, 0, 100, 50, $white, 'arial.ttf', 'Some text');
imagepng($template);
?>
Using your code, if I set imagealphablending to true (or comment it out) it works fine.