DataTables warning: JSON data from server could not be parsed.

DataTables warning: JSON data from server could not be parsed.

progersprogers Posts: 7Questions: 0Answers: 0
edited April 2013 in Editor
I'm using the 15-day trial to play around with datatables and the datatables editor. I'm just trying to reproduce the add/update/delete inline control example. I updated /php/lib/config.php with my connection information and I think I've included all the correct support files. However I am getting this error and I'm not sure what I can do to fix it. Any help is greatly appreciated, thanks in advance!

Table:
#myprojtbl

Debug:
http://debug.datatables.net/uloxax

Site:
http://playcreativedevelopment.com/expressquote/html%20files/task-2.html

Replies

  • allanallan Posts: 57,686Questions: 1Answers: 9,195 Site admin
    Thank you for the links. This is what is in the Ajax return (which indeed, is not valid JSON):

    [code]


    Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/adamlohman/playcreativedevelopment.com/expressquote/html files/php/browsers.php on line 12

    [/code]

    Very likely your server has an old version of PHP on it. The Editor libraries require PHP 5.3 or newer as they utilise some of the features that were introduced in 5.3 to present a clean API.

    Allan
  • progersprogers Posts: 7Questions: 0Answers: 0
    edited April 2013
    I updated to PHP 5.3 and now the error I get is this:

    [code]< br / > < b > Parse error < /b>:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home / adamlohman / playcreativedevelopment.com / expressquote / html files / php / lib / config.php < /b> on line 20 < br / >[/code]

    The odd thing is that there is no code being executed on line 20 of config.php, it's just an empty line at the end of the file.

    EDIT --------

    It looks as if everything now works okay, it just took a while to update to PHP 5.3
This discussion has been closed.