Apache 2.2.4 + PHP/5.2.1 (same #40229)
| Bug #40727 | Apache 2.2.4 + PHP/5.2.1 (same #40229) | ||||
|---|---|---|---|---|---|
| Submitted: | 2007-03-05 13:33 UTC | Modified: | 2016-03-08 01:44 UTC | ||
| From: | t_wiedmann at t-online dot de | Assigned: | sixd (profile) | ||
| Status: | Closed | Package: | PDO OCI | ||
| PHP Version: | 5.2.1 | OS: | window server 2003 | ||
| Private report: | No | CVE-ID: | None | ||
[2007-03-05 13:33 UTC] t_wiedmann at t-online dot de
Description: ------------ I get the same problem mit Apache 2.2.4 like #40229. Apache restart with: [Mon Mar 05 13:21:16 2007] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Mon Mar 05 13:21:16 2007] [notice] Apache/2.2.4 (Win32) PHP/5.2.1 configured -- resuming normal operations [Mon Mar 05 13:21:16 2007] [notice] Server built: Jan 9 2007 23:17:20 Reproduce code: --------------- * Apache 2.2.4 * PDO * PHP/5.2.1 * Oracle 10g * Window Server 2003 Expected result: ---------------- No restart Actual result: -------------- Apache restart - connection failed
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-03-05 15:46 UTC] tony2001@php.net
[2007-03-06 08:20 UTC] t_wiedmann at t-online dot de
Please look a this sample. It shows some ORACLE/PLSQL access. Maybe I fix the problem. There are two mistakes in the code: (1) without this, Apache will crash (2) maybe some problem, first use of $nStatus without $nStatus = null; Hope this helps, Thomas ------------------------------------------------------- $sQuery = ''; $sQuery = $sQuery . 'BEGIN '; $sQuery = $sQuery . ' myTable.Read(:p1); '; $sQuery = $sQuery . ' myTable.GetnGroup_id(:p2); '; $sQuery = $sQuery . ' myTable.GetnStatus(:p12); '; // (1) I forgot this Line $sQuery = $sQuery . 'END; '; $stmt = $dbh->prepare($sQuery); if ($stmt) { $stmt->bindParam(':p1', $df_nWorkflow_id, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, 22 ); $stmt->bindParam(':p2', $df_nGroup_id, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, 22 ); $stmt->bindParam(':p12', $nStatus, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, 22 ); // (2) $nStatus no init to NULL $stmt->execute(); $stmt->closeCursor(); $stmt = null; } ---------------------------------------------[2007-03-06 10:45 UTC] tony2001@php.net
[2007-03-06 12:03 UTC] t_wiedmann at t-online dot de
sorry, but I cannot show you this code, PLSQL, tables.. I think, it's some PDO problem if there is $stmt->bindParam(':p12', $nStatus, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, 22 ); without any correspondent named parameters (':p12') in $sQuery. Many thanks Thomas[2007-03-06 12:04 UTC] tony2001@php.net
[2007-03-07 08:34 UTC] t_wiedmann at t-online dot de
I build a little sample to show my problem. If Line "(1)" is aktiv anything is ok. If you comment Line "(1)" Apache will crash and restart. You need some Oracle-DB and PDO extension. Hope this helps. Regards Thomas ------------------ <?php // Connection $dbh = new PDO('oci:dbname=databasename;charset=UTF-8','user','pass'); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $dbh->exec('ALTER SESSION SET NLS_NUMERIC_CHARACTERS=\'.,\''); // Init $stmt = null; $df_nWorkflow_id = 0; $df_nGroup_id = 0; $nStatus = null; // ORACLE PLSQL Package $sQuery = ''; $sQuery .= 'DECLARE '; $sQuery .= ' g_nStatus NUMBER := 0; '; $sQuery .= ' g_nGroup_id NUMBER := NULL; '; $sQuery .= ' g_nWorkflow_id NUMBER := NULL; '; $sQuery .= ' '; $sQuery .= ' PROCEDURE Init '; $sQuery .= ' IS'; $sQuery .= ' BEGIN'; $sQuery .= ' g_nWorkflow_id := 10;'; $sQuery .= ' g_nGroup_id := 20;'; $sQuery .= ' END; '; $sQuery .= ' '; $sQuery .= ' PROCEDURE GetnGroup_id ( p_nGroup_id OUT NUMBER ) '; $sQuery .= ' IS'; $sQuery .= ' BEGIN '; $sQuery .= ' p_nGroup_id := g_nGroup_id;'; $sQuery .= ' END; '; $sQuery .= ' '; $sQuery .= ' PROCEDURE GetnWorkflow_id ( p_nWorkflow_id OUT NUMBER )'; $sQuery .= ' IS'; $sQuery .= ' BEGIN '; $sQuery .= ' p_nWorkflow_id := g_nWorkflow_id;'; $sQuery .= ' END; '; $sQuery .= ' '; $sQuery .= ' PROCEDURE GetnStatus (p_nStatus OUT NUMBER)'; $sQuery .= ' IS'; $sQuery .= ' BEGIN'; $sQuery .= ' p_nStatus := g_nStatus;'; $sQuery .= ' END;'; $sQuery .= ' '; $sQuery .= 'BEGIN '; $sQuery .= ' Init;'; $sQuery .= ' GetnWorkflow_id(:p1);'; $sQuery .= ' GetnGroup_id(:p2);'; // $sQuery .= ' GetnStatus(:p12);'; // (1) comment this line -> Apache crash $sQuery .= 'END; '; $stmt = $dbh->prepare($sQuery); if ($stmt) { $stmt->bindParam(':p1', $df_nWorkflow_id, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, 22 ); $stmt->bindParam(':p2', $df_nGroup_id, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, 22 ); $stmt->bindParam(':p12', $nStatus, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT, 22 ); $stmt->execute(); $stmt->closeCursor(); $stmt = null; } // -- values echo '<br>values'; echo '<br>'.$df_nWorkflow_id; echo '<br>'.$df_nGroup_id; echo '<br>'.$nStatus; // -- expected echo '<br>expected'; echo '<br>10'; echo '<br>20'; echo '<br>0'; ?>[2007-03-07 09:03 UTC] tony2001@php.net
[2016-03-08 01:44 UTC] sixd@php.net
-Package: PDO related +Package: PDO OCI -Assigned To: +Assigned To: sixd