title: Invalid JSON Response from datatable server side
body: <p>I'm using the jQuery Datatable plugin and started doing a server-side activation due to the large volume of data being registered.</p>
  
  <p>I did everything with the same basics, just as it is in the documentation, but when loading it it informs an alert:</p>
  
  <blockquote>
    <p>Warning DataTables: table id = example - Invalid JSON response. For more information about this error, see <a href="http://datatables.net/tn/1" rel="nofollow noreferrer">http://datatables.net/tn/1</a>.</p>
  </blockquote>
  
  <p>Following as instructions, I debugged, and in the last step, where it is to show the JSON with the data, it appears: <em>This request has no response data available.</em></p>
  
  <p>Why is this error still happening? <strong>Detail:</strong> If I change JUST the fields, on the server_processing.php page in the default it works perfectly, is the database?</p>
  
  <p>The page with the <strong>simple.html</strong> table:</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript" class="init"&gt;
  
  $(document).ready(function() {
      $('#example').DataTable( {
          "processing": true,
          "serverSide": true,
          "ajax": "scripts/server_processing.php"
      } );
      (function() {
      var url = '//debug.datatables.net/bookmarklet/DT_Debug.js';
      if (typeof DT_Debug != 'undefined') {
          if (DT_Debug.instance !== null) {
              DT_Debug.close();
          } else {
              new DT_Debug();
          }
      } else {
          var n = document.createElement('script');
          n.setAttribute('language', 'JavaScript');
          n.setAttribute('src', url + '?rand=' + new Date().getTime());
          document.body.appendChild(n);
      }
  })();
  } );
  
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body class="dt-example"&gt;
      &lt;div class="container"&gt;
          &lt;section&gt;
              &lt;div class="demo-html"&gt;&lt;/div&gt;
              &lt;table id="example" class="display" cellspacing="0" width="100%"&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;ID&lt;/th&gt;
                          &lt;th&gt;Razão Social&lt;/th&gt;
                          &lt;th&gt;CNPJ&lt;/th&gt;
                          &lt;th&gt;CEP&lt;/th&gt;
                          &lt;th&gt;Rua&lt;/th&gt;
                          &lt;th&gt;Cidade&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
              &lt;/table&gt;
          &lt;/section&gt;
      &lt;/div&gt;
      &lt;br&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>And <strong>server_processing.php</strong>:</p>
  
  <pre><code>&lt;?php
  $table = 'tbl_company';
  $primaryKey = 'id_Company';
  
  $columns = array(
      array( 'db' =&gt; 'id_Company', 'dt' =&gt; 0 ),
      array( 'db' =&gt; 'razaoSocial',  'dt' =&gt; 1 ),
      array( 'db' =&gt; 'cnpj',   'dt' =&gt; 2 ),
      array( 'db' =&gt; 'cep',     'dt' =&gt; 3 ),
      array( 'db' =&gt; 'rua',   'dt' =&gt; 4 ),
      array( 'db' =&gt; 'cidade',     'dt' =&gt; 5 )
  );
  
  
  $sql_details = array(
      'user' =&gt; '***', //User
      'pass' =&gt; '***', //Pass
      'db'   =&gt; '***', //DB
      'host' =&gt; 'localhost'
  );
  
  require_once( 'ssp.class.php' );
  echo json_encode(
      SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
  );
  </code></pre>
  
  <p>I even did another debug, the datatable debugger, <a href="http://debug.datatables.net/ujutog" rel="nofollow noreferrer">here is the response</a>. Nothing.</p>