DataTables warning: JSON data from server could not be parsed. Caused by a JSON formatting error
DataTables warning: JSON data from server could not be parsed. Caused by a JSON formatting error
darstar007
Posts: 9Questions: 0Answers: 0
Hi,
I had a nice app using datatables and mysql running on my windows 7 pc. I ported everything to RHEL4 and everything should be working (did not change anything as far as the backend database or php scripts and the directory structure); however, now I'm getting the following error when I attempt to access the main page which uses Datatables:
DataTables warning (table id = 'example'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
I did not change anything that should cause any differences. The data is identical as well.
Any ideas on how I can debug this?
Thank you
I had a nice app using datatables and mysql running on my windows 7 pc. I ported everything to RHEL4 and everything should be working (did not change anything as far as the backend database or php scripts and the directory structure); however, now I'm getting the following error when I attempt to access the main page which uses Datatables:
DataTables warning (table id = 'example'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
I did not change anything that should cause any differences. The data is identical as well.
Any ideas on how I can debug this?
Thank you
This discussion has been closed.
Replies
This error is causing major headaches. Any help out there???
{
"sEcho": 0,
"iTotalRecords": "1121",
"iTotalDisplayRecords": "1121",
"aaData": [
[
"Naci",
"uint64",
"new_agency_contract_id",
"ESF",
"Custom new_agency_contract_id field.",
"1"
],
[
"Nced",
"uint64",
"new_commission_end_date",
"ESF",
"Custom new_commission_end_date field.",
"2"
]
................................
]
}
[code]
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/attr.php"
[/code]
to
[code]
"bProcessing": true,
"sAjaxSource": "scripts/json.txt"
[/code]
where json.txt was generated by running: php -f scripts/attr.php > scripts/json.txt
and it now works!!! The permissions on all files and directories are 777, so that should not be an issue.
This does not solve my problem, because I want the data to be live.
Does anyone have an idea? Is anyone even out there????
That doesn't look good - sEcho should never be 0. See: http://datatables.net/usage/server-side
> Any ideas on how I can debug this?
http://datatables.net/forums/discussion/9719/how-to-ask-for-help
1. Give us a link
2. Use the debugger and give us the code :-)
Allan
please can you tell me how to configuration to apache config?
thanks
thank you
See my previous comment:
[code]
http://datatables.net/forums/discussion/9719/how-to-ask-for-help
1. Give us a link
2. Use the debugger and give us the code :-)
[/code]
Allan