Select Page

I was migrating a website to another hostint.
It contained amongst other things a project in combination with ServerSide data (using ssp.class.php).

A quick database/file transfer was not enough.
In the logs I found a memory issue, so enhanced the memory in the php class calling the SSP class


Next there was this error.

DataTables warning: table id=table_2 - Invalid JSON response. For more information about this error, please see

json_encode returned nothing, though the corresponding sql statements were not empty.

Seemed it had something to do with encoding:

I added a extra line inside the function sql_connect.

$db->exec(‘SET NAMES utf8’);

static function sql_connect ( $sql_details )
		try {
			$db = @new PDO(
			//SB added 05/04/2021 because of empty json_encode return
			$db->exec('SET NAMES utf8');
		catch (PDOException $e) {
				"An error occurred while connecting to the database. ".
				"The error reported by the server was: ".$e->getMessage()

		return $db;