Problem with DataTables Examples

Problem with DataTables Examples

sgm6733sgm6733 Posts: 1Questions: 1Answers: 0

Hello,
I downloaded DataTables-1.10.4-trial.zip because i wanted to test the DataTables Editor. I unzipped and uploaded the files to my server, configured my database importing mysql.sql, and finally modified config.php to list my server credentials. I tested several html files but I am having problems with the ones with server access. The html files using ajax with a static text file work fine by the way.

When loading server_side/simple.html in my browser I get a popup error:

The page at www.mysite.com says:
DataTables warning: table id=example - Ajax error For more information about this error, please see http://datatables.net/tn/7.

I tracked this down to an internal server error 500 which suggested i check my php log file on my server. That file gave me this:

PHP Parse error: syntax error, unexpected T_FUNCTION in /home/webadmin/mysite.com/html/DataTables-1.10.4-trial/examples/server_side/scripts/server_processing.php on line 39, referer: http://mysite.com/DataTables-1.10.4-trial/examples/server_side/simple.html

Any ideas why this isn't working? Thanks in advance!
Stuart

Answers

  • allanallan Posts: 61,767Questions: 1Answers: 10,112 Site admin

    Hi,

    Sounds like your server might have a very old version of PHP on it. The example you specify uses an anonymous function, which requires PHP 5.3 or newer.

    Allan

This discussion has been closed.