Can't reproduced this problem in local as my local and server have different environment. This happened after setting the PDO
$db = new PDO('mysql:host='.$host.';dbname='.$db_name, $user, $pass,
array( PDO::ATTR_PERSISTENT => true));
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
However after run an update for sudo apt-get install php5-mysqlnd
. Problem fixed. So this could be one of the things you can check if you have run out of idea where's the problem coming from.