|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80556 Uncaught PDOException: SQLSTATE[HY000]: General error: 2014
Submitted: 2020-12-27 17:04 UTC Modified: 2020-12-27 23:02 UTC
From: mail at awekas dot at Assigned:
Status: Duplicate Package: PDO MySQL
PHP Version: 7.4.13 OS: CentOS 7
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:
Solve the problem:
16 + 8 = ?
Subscribe to this entry?

 [2020-12-27 17:04 UTC] mail at awekas dot at
After update my Centos 7 server to PHP lsphp74-pdo 7.4.13-1.el7 i get many PDO errors like: 
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in /var/www/xxxx.php:901 Stack trace: #0 /var/www/xxxx.php(901): PDOStatement->fetch() #1 {main} thrown in /var/www/xxxx.php on line 901 

Code is working fine with lsphp73-pdo 7.3.25-1.el8 (and lower) and lsphp74-pdo 7.4.11-1.el7
Have checked the code but no improvement. 

Test script:
include ("../pdoconnect.php");

$user = "user";
$passwd = "password";
$stmt = $pdo->prepare("SELECT timestamp, UNIX_TIMESTAMP(),id, name FROM firsttable WHERE user = :user AND password = :password ");
$stmt->execute(array(':user' => $user, ':password' => $passwd));  
$db_erg = $stmt->fetch();

$time = "2020-01-01 00:00:00";
$dump = "test0123";
$sqlstring = "TEST";

$stmt = $pdo->prepare("UPDATE secondtable SET sqlstring= :sqlstring, dump= :dump WHERE time = :time ");
$stmt->execute(array(':sqlstring' => $sqlstring, ':dump' => $dump, ':time' => $time ));  


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-27 23:02 UTC]
-Status: Open +Status: Duplicate
 [2020-12-27 23:02 UTC]
Duplicate of bug #80458

Note that it doesn't make sense to try to fetch results from a query that doesn't produce results.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 24 02:03:43 2023 UTC