php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Thank you for your help! If the status of the bug report you submitted changes, you will be notified. You may return here and check the status or update your report at any time.
The URL for your bug report is: https://bugs.php.net/bug.php?id=45287.
Bug #45287 [PATCH] PDO/ODBC driver doesn't respect PDO::ATTR_TIMEOUT option
Submitted: 2008-06-16 21:53 UTC Modified: 2009-05-03 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: csa at dside dot dyndns dot org Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID:
 [2008-06-16 21:53 UTC] csa at dside dot dyndns dot org
Description:
------------
PDO/ODBC code is not implementing timeouts support. This limits PHP applications abilities in the fast detection of inaccessible database backends.

This patch provides missing functionality:
http://dside.dyndns.org/projects/patches.dir/php-ds-odbc_timeout.patch

Reproduce code:
---------------
$dbh = new PDO("odbc:some_unreachable_server_dsn", NULL, NULL, array(
     PDO::ATTR_TIMEOUT => 1
));


Expected result:
----------------
Should timeout and throw exception in 1 second (if supported by underlying ODBC driver).

Actual result:
--------------
The specified timeout is not passed to the ODBC driver and driver's default is used.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-25 15:09 UTC] jani@php.net
Is this patch still necessary in any branches? (Update version properly 
if it is, otherwise close this :)
 [2009-05-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2016-11-02 08:53 UTC] andrejs at gmail dot com
The bug is still there and needs a fix.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Mon Feb 20 22:01:35 2017 UTC