DataTables warning: table id=example - Invalid JSON response But no response with server-side exampl

DataTables warning: table id=example - Invalid JSON response But no response with server-side exampl

jrsjrs Posts: 6Questions: 1Answers: 0

I copied the server-side example files from github.com/DataTables/DataTables/tree/master/examples/server_side:
the HTML file I used was simple.html and the scripts: server_processing.php and ssp.class.php without modification. I created a mysql table with mysql.sql (copied from the same location) also without modification.

When I load simple.html it gives me the warning in the title (abbreviated), which was unexpected, since I used the unmodified DataTables server-side example code.

I followed the advice in http://datatables.net/tn/1 but the network response didn't display the faulty json format but the message: This request has no response data available.

I used the Data Tables debugger which returned the reference 'udacas'.

It seems my result is unique since I haven't found a pertinent post. I therefore suspect that I committed some basic, silly error in setting up the example page.

I am greatly thankful if somebody could point out an error in how I implemented this example case.

jrs

Replies

  • mkleinoskymkleinosky Posts: 46Questions: 6Answers: 5

    what is the url to your page which generates the json?
    does it display valid json when loaded into a browser by itself?

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    the scripts: server_processing.php and ssp.class.php without modification.

    Without modification? server_processing.php needs your database configuration.

  • jrsjrs Posts: 6Questions: 1Answers: 0

    Yes, of course. I was inaccurate, I modified the database configuration to my specifications.

    Since there were no response data I am at a loss on how to check the generated json data, it seems there were none generated. Yet, I checked the database configuration.

  • mkleinoskymkleinosky Posts: 46Questions: 6Answers: 5

    what is the url of the page which displays the json -?
    Does it display valid json?

  • jrsjrs Posts: 6Questions: 1Answers: 0

    To check that I used the network list of the developer tools (google) but the request tab is empty, the table in the page is also empty.

    I am moving my server to another machine to make my page accessible.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    I would suggest checking your server's error log to see if there is any error information being presented.

    Allan

  • jrsjrs Posts: 6Questions: 1Answers: 0
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    As you say, there is no response. You will need to check the server's error logs.

    Allan

  • headshot9xheadshot9x Posts: 59Questions: 16Answers: 1

    Dear jrs .
    Please check debug project demo code of you at https://debug.datatables.net/ . Then you can share link . Everybody will see it and understand the problem you got.
    Thank you

  • jrsjrs Posts: 6Questions: 1Answers: 0

    I solved the problem: PHP PDO was not enabled on my server and since the SSP class uses the POD class there was no query result returned to the client.

    Thank you

This discussion has been closed.