调试神秘的508(Loop Detected)错误

I'm getting a server error (508 Loop Detected) although I don't see anything that I think could cause such a loop.

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.

the problem is that I can't seem to send a form to a php page because it gets blocked.

this is the error i get after trying to submit the form:

Failed to load resource: the server responded with a status of 508 (Loop Detected)

i have 2 files:

  • mail.php

    <?php $fname = $_POST['fname']; echo $fname; ?>
    
  • index.html (js)

    $(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);
            });
        });
    });
    
  • index.html (html)

<form action="mail.php"> <input type="text" name="fname"> <input type="submit" value="send"> </form>

I just don't see where does it detect an infinite loop in my code.

now here's the kicker: it works on a different server. (obviously, not the right one)

some more info:

  • the main domain of the server which i'm working on occaisonaly shows this (instead of a regular homepage)

Resource Limit Is Reached

The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.

I'm guessing server issues, no idea how to solve this. anybody?

Thanks

查看全部
doumei7420
doumei7420
2015/11/08 15:13
  • http
  • php
  • html
  • javascript
  • 点赞
  • 收藏
  • 回答
    私信

0个回复