Req #66062 [Opn->Fbk]: PDO_DBLIB support for PDO::ATTR_TIMEOUT

From: Date: Thu, 23 Oct 2014 06:20:18 +0000
Subject: Req #66062 [Opn->Fbk]: PDO_DBLIB support for PDO::ATTR_TIMEOUT
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188272@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66062&edit=1

 ID:                 66062
 Updated by:         ssufficool@php.net
 Reported by:        sergiu dot ionescu at gmail dot com
 Summary:            PDO_DBLIB support for PDO::ATTR_TIMEOUT
-Status:             Open
+Status:             Feedback
 Type:               Feature/Change Request
 Package:            PDO DBlib
 Operating System:   Ubuntu 12.04 LTS
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[2013-11-26 14:21:37] 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.

------------------------------------------------------------------------
[2013-11-08 12:43:33] 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.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=66062&edit=1


Thread (4 messages)

« previous php.bugs (#188272) next »