title: 500 internal server error php/javascript/ajax
body: <p>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 <code>tracker.php</code> 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: </p>
  
  <pre><code>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+="&amp;appVersion="+ navigator.appVersion;
  data+="&amp;appCodeName="+ navigator.appCodeName;
  data+="&amp;platform="+ navigator.platform;
  data+="&amp;oscpu="+ navigator.oscpu;
  data+="&amp;cookieEnabled="+ navigator.cookieEnabled;
  data+="&amp;language="+ navigator.language;
  data+="&amp;vendor="+ navigator.vendorSub;
  data+="&amp;vendorSub="+ navigator.vendor;
  data+="&amp;product="+ navigator.product;
  data+="&amp;productSub="+ navigator.productSub;
  data+="&amp;res="+(window.screen.width+"x"+window.screen.height);
  data+="&amp;url="+document.location.href;
  data+="&amp;referrer="+document.referrer;
  data+="&amp;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);
  }
  </code></pre>
  
  <p>the same js work well on my localhost and a free hosting. but here i get error...</p>
  
  <pre><code>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
  </code></pre>
  
  <p>the js file is located at <a href="http://project.abhiguru.in/project.php" rel="nofollow">http://project.abhiguru.in/project.php</a></p>
  
  <p>The same js file and the tracker.php works well on free hosting here <a href="http://abhidha.serw5.com/project.php" rel="nofollow">http://abhidha.serw5.com/project.php</a></p>
  
  <p>There is no permission problem as I ran 755 on the file.
  Fireug also says 500 internal server error.</p>