ID: 39929 User updated by: aloucks at cofront dot net Reported By: aloucks at cofront dot net Status: Open Bug Type: PDO related Operating System: Linux 2.4.31 PHP Version: 5.2.0 New Comment:
I meant seconds... 0.08ms -> 0.08s 0.0004ms -> 0.0004s Previous Comments: ------------------------------------------------------------------------ [2006-12-22 01:16:56] aloucks at cofront dot net Description: ------------ A warning is generated (SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes) when retrieving connections with the PDO::ATTR_PERSISTENT set to true. A valid and usable PDO object is returned. After 5 calls to PDO::__contruct() with the same parameters the warning goes away and the time to create the PDO object drops from 0.08ms to 0.0004ms. The warning will eventually come back and the connection time will go back up to 0.08ms for a few attempts and then resume back to 0.0004ms. After a fresh apache restart the first 5 connection attempts will always generate this warning. (I assume the pool/cache size is 5) It seems like the connection caching is actually working but a warning is generated when the connection is first established and then again after it eventually times out and a new connection is created. I'm using unixODBC w/ibm iSeriesAccess odbc drivers. This bug seems similar to bug: 39845 (http://bugs.php.net/bug.php?id=39845) but I didn't find any code changes related to it outside the pdo_pgsql dir. Also, I'm not sure if this is related, but PDO::ERRMODE_EXCEPTION, and PDO::ATTR_TIMEOUT also cause warnings to be displayed. I havn't tested any other flags. Connections failures (tested using bad a username) throw exceptions, but sql queries (tested with bad syntax) did not. Reproduce code: --------------- <?php $dbh = new PDO('odbc:dsn', 'user', 'pass', array(PDO::ATTR_PERSISTENT => true)); ?> Expected result: ---------------- The code works but a warning is generated. Actual result: -------------- PHP Warning: PDO::__construct() [<a href='function.PDO---construct'>function.PDO---construct</a>]: SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes in ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39929&edit=1