From:             peter at finalarena dot com
Operating system: RHEL3
PHP version:      5.1.4
PHP Bug Type:     PDO related
Bug description:  PDO persistent connectrions still produce E_WARNING

Description:
------------
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(
  PDO::ATTR_PERSISTENT => true
));

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 ...

-- 
Edit bug report at http://bugs.php.net/?id=38319&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38319&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38319&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38319&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38319&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38319&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38319&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38319&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38319&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38319&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38319&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38319&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38319&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38319&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38319&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38319&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38319&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38319&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38319&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38319&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38319&r=mysqlcfg

Reply via email to