php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66062 PDO_DBLIB support for PDO::ATTR_TIMEOUT
Submitted: 2013-11-08 12:43 UTC Modified: 2014-12-30 10:42 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sergiu dot ionescu at gmail dot com Assigned:
Status: No Feedback Package: PDO DBlib
PHP Version: Irrelevant OS: Ubuntu 12.04 LTS
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sergiu dot ionescu at gmail dot com
New email:
PHP Version: OS:

 

 [2013-11-08 12:43 UTC] sergiu dot ionescu at gmail dot com
Description:
------------
I am not sure if this is a bug or just an unsupported feature.
I am interested in setting the connection timeout for a PDO_DBLIB connection to an MSSQL database.
Could you please point me to the right approach?

Thanks.

Test script:
---------------
<?php

$connection = new PDO(                'dblib:dbname=****;type=pdo_mssql;host=****;model=mssql;active=1;charset=',
                $config['username'],
                $config['password'],
                array(PDO::ATTR_TIMEOUT => 1)
            );

Expected result:
----------------
I expect the connection to timeout in 1 second.

Actual result:
--------------
The connection timeouts in over 10 seconds.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-26 14:21 UTC] sergiu dot ionescu at gmail dot com
At this point it seems that this is not possible from the PHP API.
The workaround that i have found is changing the freetds configuration(/etc/freetds/freetds.conf):

connect timeout = 1

This may be closed. 

Thanks.
 [2014-01-01 12:26 UTC] felipe@php.net
-Package: PDO related +Package: PDO DBlib
 [2014-10-21 04:28 UTC] ssufficool@php.net
-Type: Bug +Type: Feature/Change Request
 [2014-10-23 06:20 UTC] ssufficool@php.net
-Status: Open +Status: Feedback
 [2014-10-23 06:20 UTC] ssufficool@php.net
Please try using this snapshot:

  http://snaps.php.net/php-trunk-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Actually fixed with commit. Mislabeled as fix for bug #66063
 [2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 04 14:01:28 2024 UTC