|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-07-13 12:23 UTC] paul at yahoo dot com
Description: ------------ When trying to use persistent PDO connections with ODBC back end following warning is shown: Warning: PDO::__construct(): SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes in C:\_debug_tmp.php on line 32 This bug is also described here: http://bugs.php.net/bug.php?id=39929 Reproduce code: --------------- <?php $dbh = new PDO('odbc:dsn', 'user', 'pass', array(PDO::ATTR_PERSISTENT => true)); ?> Expected result: ---------------- Warning should not be displayed. Actual result: -------------- Warning: PDO::__construct(): SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes in C:\_debug_tmp.php on line 32 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 12:00:01 2025 UTC |
In php 5.2.4 (windows) (pdo_odbc) I try to run this script: $attributes = array( "AUTOCOMMIT", "ERRMODE", "CASE", "CLIENT_VERSION", "CONNECTION_STATUS", "ORACLE_NULLS", "PERSISTENT", "PREFETCH", "SERVER_INFO", "SERVER_VERSION", "TIMEOUT" ); foreach ($attributes as $val) { echo "PDO::ATTR_$val: "; echo $conn->getAttribute(constant("PDO::ATTR_$val")) . "\n"; } For: PDO::ATTR_AUTOCOMMIT, PDO::ATTR_CONNECTION_STATUS, PDO::ATTR_PREFETCH, PDO::ATTR_SERVER_INFO, PDO::ATTR_SERVER_VERSION, PDO::ATTR_TIMEOUT I have warning: Warning: PDO::getAttribute() [function.PDO-getAttribute]: SQLSTATE[IM001]: Driver does not support this function: driver does not support that attribute in C:\path\to\file.php on line xx