|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24278 error while trying to save LOB
Submitted: 2003-06-21 10:28 UTC Modified: 2003-10-28 04:48 UTC
Avg. Score:4.8 ± 0.6
Reproduced:7 of 7 (100.0%)
Same Version:2 (28.6%)
Same OS:6 (85.7%)
From: trent at low dot ru Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 4CVS-2003-08-15 (stable) OS: Linux, Win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: trent at low dot ru
New email:
PHP Version: OS:


 [2003-06-21 10:28 UTC] trent at low dot ru
I got these errors while trying to inputing string to LOB using LOB's method save(); :

Warning: save() []: OCILobWrite: OCI_INVALID_HANDLE in /www/sample.php on line 15

Warning: load() [function.load.html]: OCILobGetLength: OCI_INVALID_HANDLE in /www/sample.php on line 19

This was tested with:
Latest snapshot on Linux.

Note: in oracle function there is in/out parameter used.
Additional exception from Oracle: ORA-22275: invalid LOB locator specified.

Reproduce code:
    //logging in
	$conn = OCILogon('user', 'pass', 'srvname');
    //creating new LOB locator
	$clob = OCINewDescriptor($conn, OCI_D_LOB);
	$sql = 'begin :ret:=test(lob_object=>:lob_object_param); end;';
    //parsing query - ok
	$stmt = OCIParse($conn, $sql);
    //binding variables - ok
	OCIBindByName($stmt, ':lob_object_param', &$clob, -1, OCI_B_CLOB);
	OCIDefineByName($stmt, ':lob_object_param', $clob, OCI_B_CLOB);
	OCIBindByName($stmt, ':ret', $return, 4);
	OCIExecute($stmt, OCI_DEFAULT);
	if($clob->save($param)) { // Warning: OCILobWrite: OCI_INVALID_HANDLE in sample.php on line 15
		OCICommit($conn);     // this warning appears only when using method save(); of LOB locator
	print $clob->load(); // Warning: OCILobGetLength: OCI_INVALID_HANDLE in sample.php on line 19
	                     // when using load method in LOB locator

Expected result:
I'm trying to save string as CLOB using Oracle function.
I do expect it to work fine =)
Maybe I'm doing something extremely wrong?
If so, please, correct me.

Thanx in advance.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-18 17:15 UTC]
Have you tried using the sample code provided in the php manual?
 [2003-10-28 04:48 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2003-11-26 08:40 UTC] tony2001 at phpclub dot net
this warning appears only when you did not initalize CLOB with EMPTY_CLOB();
so, it's not a bug imho.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 08:01:27 2024 UTC