title: How do you display php errors to the web browser in GAE?
body: <p>Errors in Google App Engine are being suppressed and not displayed to the browser even if error reporting is on. The html that would normally be displayed to the browser is showing in the log files.</p>
  
  <p>The following code should generate a error</p>
  
  <pre><code>&lt;?php
    error
    phpinfo();
  ?&gt;
  </code></pre>
  
  <p>When curling the page no content is returned just a 500 response code.</p>
  
  <pre><code>$ curl -i http://localhost/test.php
  
  HTTP/1.1 500 Internal Server Error
  Content-Type: text/html
  Cache-Control: no-cache
  Expires: Fri, 01 Jan 1990 00:00:00 GMT
  Content-Length: 0
  Server: Development/2.0
  Date: Fri, 02 Aug 2013 18:24:49 GMT
  </code></pre>
  
  <p>The php.ini for this application has <code>display_errors = On</code> and phpinfo correctly shows when called from within the app.</p>
  
  <p>The expected behavior is output like this</p>
  
  <pre><code>$ php-cgi54 test.php 
  
  X-Powered-By: PHP/5.4.14
  Content-type: text/html
  
  &lt;br /&gt;
  &lt;font size='1'&gt;&lt;table class='xdebug-error xe-parse-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'&gt;
  &lt;tr&gt;&lt;th align='left' bgcolor='#f57900' colspan="5"&gt;&lt;span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'&gt;( ! )&lt;/span&gt; Parse error: syntax error, unexpected 'phpinfo' (T_STRING) in /Users/example/test/test.php on line     &lt;i&gt;3&lt;/i&gt;&lt;/th&gt;&lt;/tr&gt;
  &lt;/table&gt;&lt;/font&gt;
  </code></pre>