title: Ajax Pipeline - Server Side doesn`t work for me
body: <p>At first i get the css, the datatables.js and afterwards i start with the ajax pipelining code and after all i initialize it - here it is:</p>
  <pre><code>&lt;link href=&quot;tablesorter/tablesortingStyle.css&quot; rel=&quot;stylesheet&quot; /&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;tablesorter/jquery.dataTables.min.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot; class=&quot;init&quot;&gt;
      $.fn.dataTable.pipeline = function ( opts ) {
              var conf = $.extend( {
                      pages: 5,    
                      url: '',    
                      data: null,
                      method: 'GET'
              }, opts );
              var cacheLower = -1;
              var cacheUpper = null;
              var cacheLastRequest = null;
              var cacheLastJson = null;
       
              return function ( request, drawCallback, settings ) {
                      var ajax          = false;
                      var requestStart  = request.start;
                      var drawStart     = request.start;
                      var requestLength = request.length;
                      var requestEnd    = requestStart + requestLength;
                       
                      if ( settings.clearCache ) {
                              ajax = true;
                              settings.clearCache = false;
                      }
                      else if ( cacheLower &lt; 0 || requestStart &lt; cacheLower || requestEnd   &gt; cacheUpper ) {
                              ajax = true;
                      }
                      else if ( JSON.stringify( request.order )   !== JSON.stringify( cacheLastRequest.order ) ||
                                        JSON.stringify( request.columns ) !==   JSON.stringify( cacheLastRequest.columns ) ||
                                        JSON.stringify( request.search )  !==    JSON.stringify( cacheLastRequest.search )
                      ) {
                              ajax = true;
                      }
                      cacheLastRequest = $.extend( true, {}, request );
                      if ( ajax ) {
                              if ( requestStart &lt; cacheLower ) {
                                      requestStart = requestStart - (requestLength*   (conf.pages-1));
       
                                      if ( requestStart &lt; 0 ) {
                                              requestStart = 0;
                                      }
                              }
                              cacheLower = requestStart;
                              cacheUpper = requestStart + (requestLength * conf.pages);
                              request.start = requestStart;
                              request.length = requestLength*conf.pages;
                              if ( $.isFunction ( conf.data ) ) {
                                      var d = conf.data( request );
                                      if ( d ) {
                                              $.extend( request, d );
                                      }
                              }
                              else if ( $.isPlainObject( conf.data ) ) {
                                      $.extend( request, conf.data );
                              }
                              settings.jqXHR = $.ajax( {
                                      &quot;type&quot;:     conf.method,
                                      &quot;url&quot;:      conf.url,
                                      &quot;data&quot;:     request,
                                      &quot;dataType&quot;: &quot;json&quot;,
                                      &quot;cache&quot;:    false,
                                      &quot;success&quot;:  function ( json ) {
                                              cacheLastJson = $.extend(true, {}, json);
       
                                              if ( cacheLower != drawStart ) {
                                                      json.data.splice( 0, drawStart-  cacheLower );
                                              }
                                              json.data.splice( requestLength,    json.data.length );
                                               
                                              drawCallback( json );
                                      }
                              } );
                      }
                      else {
                              json = $.extend( true, {}, cacheLastJson );
                              json.draw = request.draw;
                              json.data.splice( 0, requestStart-cacheLower );
                              json.data.splice( requestLength, json.data.length );
       
                              drawCallback(json);
                      }
              }
      };
      $.fn.dataTable.Api.register( 'clearPipeline()', function () {
              return this.iterator( 'table', function ( settings ) {
                      settings.clearCache = true;
              } );
      });
  
      $(document).ready(function(){
              // Login-Logs-Tabelle, wird mit DataTables initialisiert
              $('#mylogins').dataTable({
                      &quot;processing&quot;: true,
                      &quot;serverSide&quot;: true,
                      &quot;language&quot;: {
                              &quot;emptyTable&quot;:     &quot;Keine Daten verfügbar.&quot;,
                              &quot;info&quot;:           &quot;Zeige _START_ bis _END_ von _TOTAL_ Einträgen&quot;,
                              &quot;infoEmpty&quot;:      &quot;Zeige 0 bis 0 von 0 Einträgen&quot;,
                              &quot;infoFiltered&quot;:   &quot;(gefiltert von _MAX_ insgesamten Einträgen)&quot;,
                              &quot;infoPostFix&quot;:    &quot;&quot;,
                              &quot;thousands&quot;:      &quot;,&quot;,
                              &quot;lengthMenu&quot;:     &quot;Zeige _MENU_ Einträge&quot;,
                              &quot;loadingRecords&quot;: &quot;Lade...&quot;,
                              &quot;processing&quot;:     &quot;Wird verarbeitet...&quot;,
                              &quot;search&quot;:         &quot;Suche:&quot;,
                              &quot;zeroRecords&quot;:    &quot;Keine passenden Einträge gefunden&quot;,
                              &quot;paginate&quot;: {
                                      &quot;first&quot;:      &quot;Erste&quot;,
                                      &quot;last&quot;:       &quot;Letzte&quot;,
                                      &quot;next&quot;:       &quot;Nächste&quot;,
                                      &quot;previous&quot;:   &quot;Vorherige&quot;
                              },
                              &quot;aria&quot;: {
                                      &quot;sortAscending&quot;:  &quot;: Aktivieren, um die Spalte aufsteigend zu sortieren&quot;,
                                      &quot;sortDescending&quot;: &quot;: Aktivieren, um die Spalte     absteigend zu sortieren&quot;
                              }
                      },
                      &quot;ajax&quot;: $.fn.dataTable.pipeline({
                              url: 'tablesorter/serverside/loginlogs.php',
                              pages: 5 // Seiten die gecached werden
                      })
              });
      });
  &lt;/script&gt;
  </code></pre>
  <p>My serverside script is like that:</p>
  <pre><code>&lt;?php
  // Datenbank-Tabelle, die verwendet wird
  $table = 'loginlogs';
  
  // Der Primary key, der Tabelle
  $primaryKey = 'id';
  
  // Array of database columns which should be read and sent back to DataTables.
  // The `db` parameter represents the column name in the database, while the `dt`
  // parameter represents the DataTables column identifier. In this case simple indexes.
  $columns = array(
  array( 'db' =&gt; 'ip', 'dt' =&gt; 0 ),
      array(
      'db'        =&gt; 'status',
      'dt'        =&gt; 1,
      'formatter' =&gt; function( $d, $row ) {
          if($d == 1){
                              return &quot;Erfolgreich&quot;;
                      }else{
                              return &quot;Fehlgeschlagen&quot;;
                      }
      }
  ),
      array(
      'db'        =&gt; 'stayloggedin',
      'dt'        =&gt; 2,
      'formatter' =&gt; function( $d, $row ) {
                      if($d == 1){
                              return &quot;Ja&quot;;
                      }else{
                              return &quot;Nein&quot;;
                      }
      }
  ),
  array(
      'db'        =&gt; 'date',
      'dt'        =&gt; 3,
      'formatter' =&gt; function( $d, $row ) {
                      return getonlydate($d);
      }
  ),
      array(
      'db'        =&gt; 'date',
      'dt'        =&gt; 4,
      'formatter' =&gt; function( $d, $row ) {
                      return getonlytime($d);
      }
  )
  );
  
  // SQL server connection information
  require('../../phpfuncs/connection.php');
  $sql_details = array(
  'user' =&gt; $user,
  'pass' =&gt; $pw,
  'db'   =&gt; $db,
  'host' =&gt; $host
  );
  
  
  require('ssp.class.php');
  
  echo json_encode(
  SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns )
  );
  ?&gt;
  </code></pre>
  <p>So i have my css, js and the serverside(php) part... .
  What is my mistake?
  I get no error in the console and it is freezed in the processing part.
  I watched the network analyzer part and it has been stopped so there is nothing, where the script is trying to get or load.
  Can somebody please help me?</p>
  <p>By the way here is my debug log:
  <a href="http://debug.datatables.net/urifuz" rel="nofollow noreferrer">http://debug.datatables.net/urifuz</a></p>
  <p>I use on my test server, PHP Version 5.5.11</p>
  <h1>Edit:</h1>
  <p>I couldn't edit my post yesterday, because stackoverflow was only in a readable mode. So now i do it. I solved the problem. I used two functions in the serverside part, where i need to include my functions.php. For my bad the console didn`t recognize that and so there were no errors. But no i included the functions and all works fine.</p>