title: 500 Internal Server Error - All Ajax calls, PHP
body: <p><strong>Issue</strong></p>
  
  <p>I'm receiving the same error (500 Internal Server error) for all AJAX calls on a site I'm developing on my localhost (WAMP). I'm beginning to think that it might be the way my server is set up. Maybe I'm missing a PHP extension or something? Any help would be much appreciated.</p>
  
  <p><strong>Testing</strong></p>
  
  <p>I know the code works fine because i've navigated to the ajax action on my browser. Also the code actually saves data to the database so I know it's finding the correct script and running it ok.</p>
  
  <p><strong>Code</strong></p>
  
  <p>I've simplified the code to make testing easier.</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>    $.ajax({type: 'GET',
          url: '/cms/performances/deleteperformance',
          data: 'id=' + id,
          dataType: 'json',
          success: function(result)
          {
              switch(result)
              {
                  case 1:
                      //Refresh the page
                      location.reload();
                      break;
                  case 0:
                      alert('error');
                      break;
                  case 2:
                      alert('Incorrect call');
                      break;
                  default:
                      alert('default');
                      break;
              }
          },
          error: function(xhr, ajaxOptions, thrownError)
          {
              var httpCode = xhr.status;
              alert(httpCode + ': ' + thrownError);
          }
      });
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>public function deleteperformanceAction()
  {
      $this-&gt;_helper-&gt;layout()-&gt;disableLayout();
      $this-&gt;_helper-&gt;viewRenderer-&gt;setNoRender(true);
      echo json_encode(1);
  }
  </code></pre>