title: imagettftext not displaying the image
body: <p>I'm using the following code in the <code>test.php</code> file to generate an image from a text.</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL);
  
  // Set the content-type
  header('Content-Type: image/png');
  
  // Create the image
  $im = imagecreatetruecolor(400, 30);
  
  // Create some colors
  $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);
  
  // The text to draw
  $text = 'Testing...';
  // Replace path by your own font path
  $font = '/home/axxxxxxx/public_html/font.ttf';
  
  // Add some shadow to the text
  imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
  
  // Add the text
  imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
  
  // Using imagepng() results in clearer text compared with imagejpeg()
  imagepng($im);
  imagedestroy($im);
  
  ?&gt;
  </code></pre>
  
  <p>Then I'm trying to display the image in the <code>test2.php</code> as follows</p>
  
  <pre><code>&lt;?php
  echo "&lt;img src=\"/test.php\" /&gt;";
  ?&gt;
  </code></pre>
  
  <p>All I get is the default broken image icon. The path to the font file and image url is correct. All file permission are at 777. The servers do have the GD library. </p>
  
  <p>What might I be doing wrong?</p>