Just a note, I'm currently using 5.1.6. After debugging for a good amount of time, I've realized that the $array cannot be an associative array.
For instance, the following code will fail on the execute.
<?php
$fields = array();
$fields['name'] = "Someone";
$query = $PDO->prepare("insert table set name=?");
$query->execute($fields);
?>
For my code, I had to convert the $fields array into a non-associative array. Something like this:
<?php
$fields = array();
$fields['name'] = "Someone";
$values = array();
foreach($fields as $value) { $values[] = $value; }
$query = $PDO->prepare("insert table set name=?");
$query->execute($values);
?>