ID:               32859
 Updated by:       [EMAIL PROTECTED]
 Reported By:      Diomedes_01 at yahoo dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         OCI8 related
 Operating System: Solaris 9 (Server)
 PHP Version:      5.0.4
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

Also, you don't have to modify your script to make it run with PHP5.
Old-style named functions are working in the same way as in PHP4.


Previous Comments:
------------------------------------------------------------------------

[2005-04-27 21:44:58] Diomedes_01 at yahoo dot com

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 this bug report at http://bugs.php.net/?id=32859&edit=1

Reply via email to