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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: robertg2 at hope dot ac dot uk
New email:
PHP Version: OS:

 

 [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-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 29 11:03:35 2022 UTC