Bug #66318 [NEW]: PDO_Informix doesn't handle closed persistent connections

From: Date: Wed, 18 Dec 2013 14:39:03 +0000
Subject: Bug #66318 [NEW]: PDO_Informix doesn't handle closed persistent connections
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183393@lists.php.net to get a copy of this message
From: andreas dot streichardt at 100days dot de Operating system: openSuSE 12.2 PHP version: Irrelevant Package: PDO related Bug Type: Bug Bug description:PDO_Informix doesn't handle closed persistent connections Description: ------------ The informix PDO extension supports the PDO persistent attribute. However it seems to only save the handle and will never check if it is still valid. Whenever the connection was closed (for example database server was shut down, timeouts or whatever) the (apache in this case) process is messed up and won't be able to handle any new informix connection to that dsn. Executing any query on that broken connection will simply return false. Test script: --------------- <?php $start = microtime(true); $options = []; $options[PDO::ATTR_PERSISTENT] = true; $connection = new PDO('informix:host=ifxservdev;service=sqlexec;database=develop11;server=ifxsrv;protocol=onsoctcp;EnableScrollableCursors=1;DB_LOCALE=de_DE.cp1252;CLIENT_LOCALE=de_DE.utf8', 'develop', 'develop', $options); var_dump(microtime(true) - $start); $stmt = $connection->query("SELECT kd_nr, kd_ans1 FROM kunden"); var_dump(gettype($stmt), getmypid(), $connection->errorInfo()); Expected result: ---------------- float(1.5020370483398E-5) string(6) "object" int(27040) array(3) { [0]=> string(5) "00000" [1]=> int(0) [2]=> string(24) " ((null)[0] at (null):0)" } Actual result: -------------- float(1.5020370483398E-5) string(6) "object" int(27050) array(3) { [0]=> string(5) "00000" [1]=> int(0) [2]=> string(24) " ((null)[0] at (null):0)" } (then restart database server) float(1.4066696166992E-5) string(7) "boolean" int(27050) array(3) { [0]=> string(5) "08S01" [1]=> int(-11020) [2]=> string(129) "[Informix][Informix ODBC Driver]Communication link failure. (SQLPrepare[-11020] at /opt/PDO_INFORMIX-1.3.0/informix_driver.c:131)" } -- Edit bug report at https://bugs.php.net/bug.php?id=66318&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66318&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66318&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66318&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66318&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66318&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66318&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66318&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66318&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66318&r=support Expected behavior: https://bugs.php.net/fix.php?id=66318&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66318&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66318&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66318&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66318&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66318&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66318&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66318&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66318&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66318&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66318&r=mysqlcfg

« previous php.bugs (#183393) next »