php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57501 Setting of AUTOCOMMIT connection attribute failure
Submitted: 2007-01-30 16:08 UTC Modified: 2007-04-19 15:06 UTC
From: kfbombar at us dot ibm dot com Assigned:
Status: Not a bug Package: PDO (PECL)
PHP Version: 5.2.0 OS: Linux/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: kfbombar at us dot ibm dot com
New email:
PHP Version: OS:

 

 [2007-01-30 16:08 UTC] kfbombar at us dot ibm dot com
Description:
------------
In PHP 5.2.0 I have seen issues when trying to set the PDO::ATTR_AUTOCOMMIT attribut via the connect.  This issue was not apparent in 5.1.4.  I have reproduced the same issue with the following PDO based extensions:

- PDO_IBM
- PDO_INFOMRIX
- PDO_ODBC

Thank you.

Reproduce code:
---------------
<?php

$db = new PDO("ibm:db", "uname", "***", array(PDO::ATTR_AUTOCOMMIT => 0));

if ($db) print "Connection Established";

?>

Expected result:
----------------
Connection Established

Actual result:
--------------
Fatal error: Uncaught exception 'PDOException' with message 'The auto-commit mode cannot be changed for this driver' in repro.php:3
Stack trace:
#0 repro.php(3): PDO->__construct('ibm:db', 'unam', '***', Array)
#1 {main}
  thrown in repro.php on line 3


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-19 15:06 UTC] kfbombar at us dot ibm dot com
Advice from tony2001 shows that this is support missing in the drivers themselves and not in the PDO layer itself. Thanks Tony!
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Jan 24 22:01:25 2020 UTC