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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
42 - 41 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC