sEcho Error from server_processing.php

sEcho Error from server_processing.php

ukphpukphp Posts: 2Questions: 0Answers: 0
edited April 2012 in DataTables 1.9
Hi,

I'm trying to get dataTables working locally using WAMP. I'm using PHP and MySQL and have followed the server-side processing example but am getting the following error message.

[code]Undefined index: sEcho in C:\wamp\www\dataTable\functions\server_processing.php on line 148
{"sEcho":0,"iTotalRecords":"4","iTotalDisplayRecords":"4","aaData":[[ [/code]

Server-side example used - http://datatables.net/release-datatables/examples/server_side/server_side.html

I've searched through the forum and read up on other people's suggestions, so I've checked the following FAQ below but not sure what it's really telling me to do. Any suggestions as to what to try?

http://datatables.net/usage/server-side

Thanks in advance

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Have your enabled bServerSide and are you using GET (default) or POST?

    Allan
  • ukphpukphp Posts: 2Questions: 0Answers: 0
    Hi Allan,

    Yes I've enabled bServerSide in the jQuery.....

    [code]

    // data table basic initialisation
    jQuery(document).ready(function() {
    $('#table_id').dataTable( {
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "functions/server_processing.php"
    } );
    });

    [/code]

    Also using the default GET.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    If you look at the XHR in Firebug or inspector you should be able to see the sEcho parameter in the GET URL (as you canon this example: http://datatables.net/release-datatables/examples/data_sources/server_side.html ). How are you trying to access the parameter?

    Allan
This discussion has been closed.