php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57746 Throws warning if persistent connections are enabled
Submitted: 2007-07-13 12:23 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: paul at yahoo dot com Assigned:
Status: Open Package: PDO_ODBC (PECL)
PHP Version: 5.2.1 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: paul at yahoo dot com
New email:
PHP Version: OS:

 

 [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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-26 11:00 UTC] michal dot zglinski at gmail dot com
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
 [2009-11-30 14:58 UTC] kabot at go2 dot pl
I have the same problem on linux, php 5.2.8

PHP Warning:  PDO::__construct() [<a href='pdo.--construct'>pdo.--construct</a>]: SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes in db.php on line 41
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 07:01:25 2019 UTC