开发者

500 Internal error with JQuery data submission

I'm sending values from a form to the DB using jQuery on my server and it's working fine.

Now I moved the website to another server and it doesn't work anymore.

When I hit the "send" button, I get an alert with "[object Object]", and if I inspect I see :

POST [...truncated url...]/contact_conveyor.php?timestamp=607 500 (Internal Server Error)

Here's my code :

var oDate = new Date();
$.ajaxSetup({
    cache: false
});

$.ajaxSetup({ scriptCharset: "utf-8" ,contentType: "application/x-www-form-urlencoded; charset=UTF-8" });

$.ajax({    
  url: 'contact_conveyor.php?timestamp='+oDate.getMilliseconds(),
  data: {language:language,email:email,fullName:fullName,message:message},
  dataType: 'html',
  cache: false,
  type: "POST",
  success : function(text){
    var output = '<div class开发者_高级运维="formulaire reponse">'+text+"</div>";
    $(".formulaire").replaceWith(output);
  },
  error : function(text){
      alert(text);
  }
});

I checked the contact_conveyor.php permissions and they're set to 777 +x. What shall I try ? It was working fine on the other server ! :o)

I've removed everything from the PHP file that gets called except an echo statement and I still get the 500 Internal Server Error.

Is there a php.ini setting that could cause that ?


Your problem is not jQuery related.

Your file *contact_conveyor.php* is producing an error when executed.

Since you've moved to a different server, check that php file for server paths and/or other server related configuration variables.


First, use firebugs net tab to see exactly what is being sent, where it is being sent to and what the exact response is. Then look at your PHP to figure out why its generating that response for the given input.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜