Is DataTables not working after upgrading your PHP version? Your existing project may throw an error when you upgrade your PHP version from 7.x to 8.x. This datatables php error seems to only occur when you are using server side processing and the complex function from the ssp.class.php file.
In PHP versions 7.3 and 7.4, this functions works fine but the upgrade to 8.0 or later causes it to break and throw an error. This error indicates that you have a mismatch in the number of bound variables vs the number of tokens.
The error only appears when you invoke the complex function. Using "simple" will not cause any issues. Implementing a "where clause" with the ssp.class.php file from 7.4 and prior will almost certainly break when upgrading to newer versions of PHP.
PHP 7.4 has an end of life of November 2022, as such many who utilize DataTables in their PHP sites and applications will want to upgrade to prevent any attacks.
Fortunately, the good people with the DataTables project have released a patch that works like a charm. Simply replace your current ssp.class.php file with this one and you'll be all set. If you'd rather get it from Github here is the link!
Posted by: Matt Irving on 10/05/2022