Bug #57746 [Opn->Csd]: Throws warning if persistent connections are enabled
| From: | cmb@php.net | Date: | Mon, 15 Feb 2021 12:54:13 +0000 |
| Subject: | Bug #57746 [Opn->Csd]: Throws warning if persistent connections are enabled | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232165@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=57746&edit=1
ID: 57746
Updated by: cmb@php.net
Reported by: paul at yahoo dot com
Summary: Throws warning if persistent connections are enabled
-Status: Open
+Status: Closed
Type: Bug
-Package: PDO_ODBC
+Package: *General Issues
Operating System: Windows
PHP Version: 5.2.1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I think this is fixed[1] as of PHP 5.3.0.
[1] <https://github.com/php/php-src/commit/77e914e6dcb511603cd3544ac2251fc1503a982e>
Previous Comments:
------------------------------------------------------------------------
[2009-11-30 14:58:45] 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
------------------------------------------------------------------------
[2007-09-26 11:00:16] 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
------------------------------------------------------------------------
[2007-07-13 12:23:13] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=57746&edit=1