Since a couple of days I have one application (on a Clients server I do not have full access to yet) that refuses to obey the PDO::ATTR_STRINGIFY_FETCHES=false
setting.
Code below should return integer
(as it does on my own servers)
Yet on one server (I mailed them this testcode) it returns string
$PDO = new PDO("mysql:host=" . DB_SERVER . ";dbname=" . DB_NAME . ";charset=utf8", DB_USER, DB_PASS);
$PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$PDO->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$PDO->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
$stmt = $PDO->prepare("SELECT * FROM information_schema.tables WHERE table_name='TABLES';");
$stmt->execute();
$tables = $stmt->fetch(PDO::FETCH_ASSOC);
echo "<H1>" . gettype($tables['VERSION']) . "</H1>";
var_dump($tables);
Setting PDO::ATTR_STRINGIFY_FETCHES=true
of course exhibits the same behaviour on my own servers, as PDO by default returns integers as strings.
But the application requires integers to be integers in PHP.
As said; I do not yet have access to that server. Any pointers though?
Update
I finally got some phpinfo()
MySQLND is (for unknown reason) now missing (it was there before as the application ran fine)
Have directed sys-admins to blogs on activating MySQLND (again)