Doc #76019 [NEW]: PDO::ATTR_AUTOCOMMIT attribut via the connect
| From: | scriviaoscar at yahoo dot it | Date: | Tue, 27 Feb 2018 14:16:39 +0000 |
| Subject: | Doc #76019 [NEW]: PDO::ATTR_AUTOCOMMIT attribut via the connect | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-15474@lists.php.net to get a copy of this message | ||
From: scriviaoscar at yahoo dot it
Operating system: centos 7.4
PHP version: 7.2.2
Package: PDO ODBC
Bug Type: Documentation Problem
Bug description:PDO::ATTR_AUTOCOMMIT attribut via the connect
Description:
------------
---
From manual page: http://www.php.net/ref.pdo-odbc
---
In PHP 7.2.2 I have seen issues when trying to set the
PDO::ATTR_AUTOCOMMIT attribut via the connect.
This issue was not apparent in 7.2.0 I have reproduced the same issue
with the following PDO based extensions:
- PDO_ODBC
Reproduce code:
---------------
<?php
$db = new PDO("ibm:db", "uname", "***", array(PDO::ATTR_AUTOCOMMIT
=>
0));
if ($db) print "Connection Established";
?>
Expected result:
----------------
Connection Established
Test script:
---------------
$conn = new PDO ( "odbc:" . $this->nameDB, $this->utente, $this->pass,
array (
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"
) );
if (! $conn) {
Logger::getInstance ()->logMessage ( 'Connessione Sap fallita.',
Logger::ERROR );
throw new Exception ( 'Connessione Sap fallita.',
GlobalConstants::EXCEPTION_MESSAGE_FROM_SERVER );
}
$conn->setAttribute ( PDO::ATTR_AUTOCOMMIT, 0 );
Expected result:
----------------
'PDOException' with message 'The auto-commit mode cannot be changed for
this driver'
Actual result:
--------------
'PDOException' with message 'The auto-commit mode cannot be changed for
this driver'
--
Edit bug report at https://bugs.php.net/bug.php?id=76019&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76019&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76019&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76019&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76019&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76019&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76019&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76019&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76019&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76019&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76019&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76019&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76019&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76019&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76019&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76019&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76019&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76019&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76019&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76019&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76019&r=mysqlcfg