Bug #71290 [NEW]: PDO::query() throws both an error and an exception if server has gone away

From: Date: Tue, 05 Jan 2016 17:11:32 +0000
Subject: Bug #71290 [NEW]: PDO::query() throws both an error and an exception if server has gone away
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198434@lists.php.net to get a copy of this message
From: jurchiks101 at gmail dot com Operating system: Windows 7 x64 PHP version: 5.6Git-2016-01-05 (Git) Package: PDO MySQL Bug Type: Bug Bug description:PDO::query() throws both an error and an exception if server has gone away Description: ------------ PHP version: http://windows.php.net/snapshots/ PHP 5.6 Revision: r227c898 (January 04 2016, 03:00:00) VC11 x86 Non Thread Safe I would have tried PHP 7 as well, but your PHP 7 Windows builds have incompatible extension API versions, for which I have already created a bug report. Also, there are no PHP 7 snapshots for Windows. All I did was download and extract the PHP snapshot, rename php.ini-development to php.ini, enable extension=pdo_mysql.dll, and run php.exe test.php with the script from the Gist. Test script: --------------- https://gist.github.com/jurchiks/c8fff1e5ec8c97005425 Expected result: ---------------- There should be no error output since PDO::ATTR_ERRMODE is set to ERRMODE_EXCEPTION. Actual result: -------------- Both error and exception are output. -- Edit bug report at https://bugs.php.net/bug.php?id=71290&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71290&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71290&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71290&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71290&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71290&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71290&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71290&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71290&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71290&r=support Expected behavior: https://bugs.php.net/fix.php?id=71290&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71290&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71290&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71290&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71290&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71290&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71290&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71290&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71290&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71290&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71290&r=mysqlcfg

« previous php.bugs (#198434) next »