|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38319 PDO persistent connectrions still produce E_WARNING
Submitted: 2006-08-03 21:01 UTC Modified: 2006-12-04 03:09 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: peter at finalarena dot com Assigned:
Status: Closed Package: PDO related
PHP Version: 5.1.4 OS: RHEL3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: peter at finalarena dot com
New email:
PHP Version: OS:


 [2006-08-03 21:01 UTC] peter at finalarena dot com
When creating a PDO connection with the Mysql driver, and setting a persistent default fetch mode, PHP will generate an E_WARNING message.

The PDO, Mysql driver is version 5.0.19 as reported by phpinfo.

The source has the comment: "TODO: CRITICAL for final release" 

1816  20 :  if (stmt->dbh->is_persistent) {
1817     :      /* TODO: CRITICAL for final release */
1818   0 :      php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP might crash if you don't call $stmt->setFetchMode() to reset to defaults on this persistent statement.  This will be fixed in a later release");
1819     :  }

Reproduce code:
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array(

Expected result:
 PDOStatement::setFetchMode() to run without an E_WARNING.

Actual result:
Warning: PDOStatement::setFetchMode() [function.setFetchMode]: PHP might crash if you don't call $stmt->setFetchMode() to reset to defaults on this persistent statement. This will be fixed in a later release in ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-04 03:09 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 18 05:07:33 2022 UTC