turn on php pdo error reportings code example Example: pdo turn on errors $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);