title: angular js showing 500 server error
body: <p>I am getting 500 server error while i am writing a code for $http in angularJs. I am using Ubuntu OS </p>
  
  <h2>Code is given below</h2>
  
  <pre><code> $http({
          method: 'POST',
          url: 'http://localhost.com/domain/index.php?r=site/CheckDomain',
          headers: {'Authorization': 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='},
          data: {urlName: $scope.urlName, domainExt: $scope.domainExt},
      }).success(function(data, status, headers, config) {
          toaster.pop('success', "Successer", 'Total 7 Result Found', 25000, 'trustedHtml', '');
          //$scope.domainExt = data;
          $scope.results = data.records;
          $scope.showresult = true;
          //Code use to assign default values in price dropdown
          angular.forEach($scope.results, function(value, key) {
              $scope.model[key] = value.selectedOption.dp_id;
          });
  
  
      }).error(function(data, status, headers, config) {
  
      });
  </code></pre>
  
  <h2>Response is given below</h2>
  
  <p>Access-Control-Allow-Orig...    <a href="http://localhost.com/domain/" rel="nofollow">http://localhost.com/domain/</a> <br>
  Connection  close <br>
  Content-Type    text/html<br>
  Date    Sun, 14 Sep 2014 06:52:46 GMT<br>
  Server  Apache/2.4.7 (Unix) OpenSSL/1.0.1f PHP/5.5.9 mod_perl/2.0.8-dev Perl/v5.16.3<br>
  X-Powered-By    PHP/5.5.9<br></p>
  
  <p>Accept  application/json, text/plain, <em>/</em><br>
  Accept-Encoding gzip, deflate<br>
  Accept-Language en-US,en;q=0.5<br>
  Authorization   Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==<br>
  Content-Length  38<br>
  Content-Type    application/json;charset=utf-8<br>
  Cookie  KCFINDER_showname=on; KCFINDER_showsize=off; KCFINDER_showtime=off;<br> KCFINDER_order=name; KCFINDER_orderDesc=off; KCFINDER_view=thumbs; <br>KCFINDER_displaySettings=off
  Host    localhost.com<br></p>