#32859 [NEW]: Error when attempting to write Clob to oracle
| From: | Diomedes_01 at yahoo dot com | Date: | Wed, 27 Apr 2005 19:44:59 +0000 |
| Subject: | #32859 [NEW]: Error when attempting to write Clob to oracle | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-78308@lists.php.net to get a copy of this message | ||
From: Diomedes_01 at yahoo dot com
Operating system: Solaris 9 (Server)
PHP version: 5.0.4
PHP Bug Type: OCI8 related
Bug description: Error when attempting to write Clob to oracle
Description:
------------
I am receiving errors after upgrading from php 4.3.9 to php 5.0.4 when
attempting to upload a clob to my Oracle database. The code has already
been modified to follow the PHP 5 paradigm; but it is refusing to
function. Code is as follows:
Reproduce code:
---------------
$sql1 = ("begin append_comments(:incident_id,:comments_id);end;");
$sth = oci_parse ( $connection, $sql1 ) or display_main_error();
$clob = oci_new_descriptor ($connection, OCI_D_LOB);
oci_bind_by_name ( $sth, ":incident_id", $incident );
oci_bind_by_name ($sth, ":comments_id", &$clob, -1, OCI_B_CLOB );
$clob->write($comments);
oci_execute ($sth, OCI_DEFAULT) or display_main_error();
oci_commit($connection);
$clob->free();
oci_free_statement($sth);
Expected result:
----------------
The above code should properly insert the clob into the Oracle database.
The code executed correctly in php4.3.9 and the stored procedure being
used functions normally in SQL*Plus.
Actual result:
--------------
I receive the following warnings from PHP when attempting to execute the
code:
Warning: OCI-Lob::write() [function.write]: OCILobGetLength:
OCI_INVALID_HANDLE in /www/htdocs/EtrackTest/oracle_update.php on line
218
Warning: oci_execute() [function.oci-execute]: OCIStmtExecute: ORA-22275:
invalid LOB locator specified ORA-06512: at "SYS.DBMS_LOB", line 366
ORA-06512: at "ETRACK.APPEND_COMMENTS", line 14 ORA-06512: at line 1 in
/www/htdocs/EtrackTest/oracle_update.php on line 219
The code I use is virtually identical to what exists in the PHP
documentation.
--
Edit bug report at http://bugs.php.net/?id=32859&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32859&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32859&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32859&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32859&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32859&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32859&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32859&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32859&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32859&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32859&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32859&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32859&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32859&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32859&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32859&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32859&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32859&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32859&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32859&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32859&r=mysqlcfg