title: PHP: How to solve ob_start() in combination imagepng() issue?
body: <p>I use the following code to create an image and encode it to base64. There is no direct output of the image.</p>
  
  <pre><code>ob_start(); // catching the output buffer
  imagepng($imgSignature);
  $base64Signature=base64_encode(ob_get_contents());
  ob_end_clean();
  </code></pre>
  
  <p><code>ob_start</code> started recently to throw error 500 and I have trouble figuring out the issue. The server uses php 5.4.11. I really don't know if it was running the same version as I installed the script, of if the memory runs full. I know that ob_start has changed throughout the php version. I really have a hard time to wrap my head around this. Is the script correct for php 5.4.11?</p>
  
  <p>I really appreciate any help. </p>