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
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
what is the url to your page which generates the json?
does it display valid json when loaded into a browser by itself?
Without modification? server_processing.php needs your database configuration.
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.
what is the url of the page which displays the json -?
Does it display valid json?
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.
I would suggest checking your server's error log to see if there is any error information being presented.
Allan
The url of my page is at http://niesen.umassmed.edu/dt/simple.html
As you say, there is no response. You will need to check the server's error logs.
Allan
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
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