|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-02-27 14:16 UTC] scriviaoscar at yahoo dot it
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' PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 00:00:01 2025 UTC |
In PHP 7.2.3 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 $db = new PDO("ibm:db", "uname", "***", array(PDO::ATTR_AUTOCOMMIT => 0)); if ($db) print "Connection Established"; 'PDOException' with message 'The auto-commit mode cannot be changed for this driver'