php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56818 Inserting multiple rows with clob fields
Submitted: 2006-02-03 06:06 UTC Modified: 2006-02-03 06:28 UTC
From: robertg2 at hope dot ac dot uk Assigned:
Status: Not a bug Package: oci8 (PECL)
PHP Version: 5.0.4 OS: Suse Linux 10.0
Private report: No CVE-ID: None
 [2006-02-03 06:06 UTC] robertg2 at hope dot ac dot uk
Description:
------------
The code below, within a foreach loop inserting a number of rows into a table using clob fields, succeeds in 1.1.1 but fails from cvs downloaded today.  The CLOB values being written are very small (maximum 30 characters in length).

It seems that the first loop through works okay but the second one fails.

Reproduce code:
---------------
foreach ($_POST as $strKey => $strValue) {
if ($strKey != 'QUESTIONNUMBER' && $strKey != 'MANDATORY') {
if (trim($strValue) != "") {
$booFound = true;
$s2 = oci_parse($conn, $strSql2);
$clob = oci_new_descriptor($conn, OCI_D_LOB);	
$strOraclePartname = trim($strKey);
oci_bind_by_name($s2, ":P_PARTNAME", $strOraclePartname);
oci_bind_by_name($s2, ":P_ANSWER", $clob, -1, OCI_B_CLOB);
oci_execute($s2, OCI_DEFAULT);
$clob->save(trim($strValue));
oci_commit($conn);
oci_free_statement($s2);
$clob->free();
}
}
}	

Expected result:
----------------
Errors in the apache log take the form of this:

[Fri Feb 03 10:36:27 2006] [notice] child pid 4211 exit signal Segmentation fault (11)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-03 06:18 UTC] tony2001 at phpclub dot net
http://bugs.php.net/bug.php?id=36010 - isn't it the same problem?
 [2006-02-03 06:23 UTC] robertg2 at hope dot ac dot uk
Ah yes Tony, so it is.  Sorry about that.
 [2006-02-03 06:28 UTC] tony2001 at phpclub dot net
Ok, so feel free to add comments to that report if you have any additional info.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC