Bug #80556 [NEW]: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014

From: Date: Sun, 27 Dec 2020 17:04:43 +0000
Subject: Bug #80556 [NEW]: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231268@lists.php.net to get a copy of this message
From: mail at awekas dot at Operating system: CentOS 7 PHP version: 7.4.13 Package: PDO MySQL Bug Type: Bug Bug description: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014 Description: ------------ 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 )); $stmt->fetch(); -- Edit bug report at https://bugs.php.net/bug.php?id=80556&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80556&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80556&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80556&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80556&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80556&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80556&r=support Expected behavior: https://bugs.php.net/fix.php?id=80556&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80556&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80556&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80556&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80556&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80556&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80556&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80556&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80556&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80556&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80556&r=mysqlcfg

« previous php.bugs (#231268) next »