title: debugging a mysterious 508 (Loop Detected) error
body: <p>I'm getting a server error (508 Loop Detected) although I don't see anything that I think could cause such a loop.</p>
  
  <p>I've done some reading, but couldn't find much information on that and I 
  would really appreciate if someone shed some light on it.</p>
  
  <p>the problem is that I can't seem to send a form to a php page because it gets blocked.</p>
  
  <p>this is the error i get after trying to submit the form:</p>
  
  <blockquote>
    <p>Failed to load resource: the server responded with a status of 508
    (Loop Detected)</p>
  </blockquote>
  
  <p>i have 2 files:</p>
  
  <ul>
  <li><p>mail.php</p>
  
  <pre><code>&lt;?php $fname = $_POST['fname']; echo $fname; ?&gt;
  </code></pre></li>
  <li><p>index.html (js)</p>
  
  
  
  
  
  <pre><code>$(document).ready(function () {
  
      $('form').submit(function (e) {
          e.preventDefault();
  
          var data = $(this).serialize(),
          url = $(this).prop('action');
  
          $.post(url, data, function (res) {
  
              console.log(res);
          });
      });
  });
  </code></pre>
  
  </li>
  <li>index.html (html) </li>
  </ul>
  
  <p><code>&lt;form action="mail.php"&gt;
          &lt;input type="text" name="fname"&gt;
          &lt;input type="submit" value="send"&gt;
      &lt;/form&gt;</code></p>
  
  <p>I just don't see where does it detect an infinite loop in my code.</p>
  
  <p>now here's the kicker: <strong>it works on a different server</strong>. (obviously, not the right one)</p>
  
  <p>some more info: </p>
  
  <ul>
  <li>the main domain of the server which i'm working on occaisonaly shows this (instead of a regular homepage)</li>
  </ul>
  
  <blockquote>
    <p>Resource Limit Is Reached</p>
    
    <p>The website is temporarily unable to service your request as it
    exceeded resource limit. Please try again later.</p>
  </blockquote>
  
  <p>I'm guessing server issues, no idea how to solve this. anybody? </p>
  
  <p>Thanks </p>