Bug #66062 [Com]: PDO_DBLIB support for PDO::ATTR_TIMEOUT

From: Date: Tue, 26 Nov 2013 14:21:37 +0000
Subject: Bug #66062 [Com]: PDO_DBLIB support for PDO::ATTR_TIMEOUT
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182945@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 Comment by: sergiu dot ionescu at gmail dot com Reported by: sergiu dot ionescu at gmail dot com Summary: PDO_DBLIB support for PDO::ATTR_TIMEOUT Status: Open Type: Bug Package: PDO related Operating System: Ubuntu 12.04 LTS PHP Version: Irrelevant Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#182945) next »