title: imagecreate function not working on amazon ec2 environment
body: <p>I have created an amazon machine running linux installed apache php gd and i was running this php code it was like this</p>
  
  <pre><code>&lt;?php
  create_image();
  print "&lt;img src=image.png&gt;";
  
  function  create_image(){
          $im = @imagecreate(200, 200) or die("Cannot Initialize new GD image stream");
          $background_color = imagecolorallocate($im, 255, 255, 0);   // yellow
  
          $red = imagecolorallocate($im, 255, 0, 0);                  // red
          $blue = imagecolorallocate($im, 0, 0, 255);                 // blue
          imageline ($im,   5,  5, 195, 5, $red);
          imageline ($im,   5,  5, 195, 195, $blue); 
  
          imagepng($im,"image.png");
          imagedestroy($im);
  }
  ?&gt;
  </code></pre>
  
  <p>works fine on my local machine but i get 500 internal server error when i uploaded it to ec2 instance 
  after i did some research i installed automake19 on the machine and this time php codes are running but the image is not being made i even tried several other codes which make image file but none of them made image can any body tell me whats wrong im doing and what more should ps notei install permissions of the directory is set to 755 </p>