开发者

500 internal server error php/javascript/ajax

开发者 https://www.devze.com 2023-03-01 17:39 出处:网络
I uploaded my project to my hosting provider. Doing so has lead to an error in a JavaScrript file. This JavaScript is needed, because I render an alert that shows the data that JavaScript fetches, but

I uploaded my project to my hosting provider. Doing so has lead to an error in a JavaScrript file. This JavaScript is needed, because I render an alert that shows the data that JavaScript fetches, but it not sending the GET response to another file tracker.php which insert it into the database. the GET response is sending via AJAX. i m getting 500 internal server error. Are the any visible errors in code that could be causing this:

function getXMLHTTPObject() {
    var xmlHttp;

    try {
        xmlHttp=new XMLHttpRequest();
    } 

    catch (e) {
        try {
       开发者_开发技巧     xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        } 

        catch (e) {
            try {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            } 

            catch (e) {
                // alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }

    return xmlHttp;
}

function trackMe() {
    var xmlHttp = getXMLHTTPObject();
    xmlHttp.onreadystatechange=function() {

    if(xmlHttp.readyState==4) {
        var response=xmlHttp.responseText;
        alert(response);
    }
}

var data;
data="appName="+ navigator.appName;
data+="&appVersion="+ navigator.appVersion;
data+="&appCodeName="+ navigator.appCodeName;
data+="&platform="+ navigator.platform;
data+="&oscpu="+ navigator.oscpu;
data+="&cookieEnabled="+ navigator.cookieEnabled;
data+="&language="+ navigator.language;
data+="&vendor="+ navigator.vendorSub;
data+="&vendorSub="+ navigator.vendor;
data+="&product="+ navigator.product;
data+="&productSub="+ navigator.productSub;
data+="&res="+(window.screen.width+"x"+window.screen.height);
data+="&url="+document.location.href;
data+="&referrer="+document.referrer;
data+="&uid=4bcc7d93e1b66";
xmlHttp.open("GET","tracker.php?"+data,true);
xmlHttp.send(null);
//xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
//xmlHttp.setRequestHeader("Content-length", data.length);
//xmlHttp.setRequestHeader("Connection", "close");
alert(data);
//xmlHttp.send(data);
}

the same js work well on my localhost and a free hosting. but here i get error...

server error log-
[Fri Apr 29 04:21:31 2011] [error] [client 117.199.154.173] File does not exist: /home/abhiguru/public_html/project/500.shtml, referer: /project.php
[Fri Apr 29 04:19:33 2011] [error] [client 117.199.154.173] File does not exist: /home/abhiguru/public_html/project/500.shtml, referer: /project.php
[Fri Apr 29 04:19:04 2011] [error] [client 117.199.154.173] File does not exist: /home/abhiguru/public_html/project/500.shtml, referer: /project.php

the js file is located at http://project.abhiguru.in/project.php

The same js file and the tracker.php works well on free hosting here http://abhidha.serw5.com/project.php

There is no permission problem as I ran 755 on the file. Fireug also says 500 internal server error.

0

精彩评论

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