I'm connecting to a closed-source database called Vertica via unixODBC and
PDO.  Everything is working great but I am having trouble getting
PDO::ATTR_TIMEOUT attribute working when I create a connection via:

$this->conn = new PDO($dsn, $user, $password,
                      array(PDO::ATTR_DEFAULT_FETCH_MODE =>
                            PDO::ATTR_TIMEOUT => 2));


$this->conn->setAttribute(PDO::ATTR_TIMEOUT, 2);

I also found this bug from 2008 (https://bugs.php.net/bug.php?id=45287),
which contains a patch for this issue.  But browsing the php mirror on
github, I don't see this patch applied:

Does anyone have any experience or advice with how I could implement a
database connection timeout without this patch?  Thanks!


Reply via email to