Bug #79339 [NEW]: Multiple QSECOFR jobs on db2_pconnnect

From: Date: Tue, 03 Mar 2020 11:30:56 +0000
Subject: Bug #79339 [NEW]: Multiple QSECOFR jobs on db2_pconnnect
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225865@lists.php.net to get a copy of this message
From: ml at menten dot com Operating system: IBM i PHP version: Irrelevant Package: *Database Functions Bug Type: Bug Bug description:Multiple QSECOFR jobs on db2_pconnnect Description: ------------ With ZendServer 2019 on IBM i (tested with PHP Version 7.2.15) i have the following behaviour: My project uses db2_pconnect which results in a QSECOFR job. Because of multiple requests via javascript on a page loading additional QSECOFR jobs are created. The requests are made with post to the same url, only different parameters are used. When i log off and make a db2_pclose, only one job is ended, the other jobs stay in the system until i restart ZendServer. Test script: --------------- index.html: <!DOCTYPE html> <html lang="de"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>test</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> </head> <script type="text/javascript"> function sleep(milliseconds) { return new Promise(resolve => setTimeout(resolve, milliseconds)); } jQuery.post("test.php",{do: 'connect'}); sleep(2000); jQuery.post("test.php",{do: 'select'}); jQuery.post("test.php",{do: 'select'}); jQuery.post("test.php",{do: 'select'}); jQuery.post("test.php",{do: 'select'}); sleep(2000); jQuery.post("test.php",{do: 'close'}); </script> <body> </div> </body> </html> ############################################################ test.php <?php // Config $username = "user"; $password = "pw"; $database = "database"; // Connection $conn_option = array( 'i5_naming' => DB2_I5_NAMING_ON, 'i5_dbcs_alloc' => DB2_I5_DBCS_ALLOC_ON, 'i5_libl' => $database, 'i5_curlib' => $database ); $conn = db2_pconnect("*LOCAL", $username, $password, $conn_option); if ($_POST["do"] == "select") { $query = "SELECT * from ".$database.".MODCFG FETCH FIRST 1 ROWS ONLY OPTIMIZE FOR 1 ROWS"; $params = array(); // prepare query $prepQuery = @db2_prepare($conn, $query); // prepare error if (db2_stmt_errormsg()) { var_dump(db2_stmt_errormsg()); echo "<br>"; } else { // execute query $result = @db2_execute($prepQuery, $params); if (db2_stmt_errormsg()) { var_dump(db2_stmt_errormsg()); echo "<br>"; } else { while ($row = db2_fetch_assoc($prepQuery)) { # var_dump($row); echo "SELECT OK ###########################"; echo "<br>"; } } } } if ($_POST["do"] == "close") { db2_pclose($conn); } ?> Expected result: ---------------- I would expect that all jobs are closed with the db2_pcloase, as all off them should use the same persitant connection. Actual result: -------------- 4 QSECOFR jobs remain unclosed. -- Edit bug report at https://bugs.php.net/bug.php?id=79339&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79339&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79339&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79339&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79339&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79339&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79339&r=support Expected behavior: https://bugs.php.net/fix.php?id=79339&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79339&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79339&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79339&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79339&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79339&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79339&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79339&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79339&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79339&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79339&r=mysqlcfg

« previous php.bugs (#225865) next »