I don't think this is the bug with oracle as I was able to do the same with C program having OCI calls.
John, I am aware of this work-around. But this requires some changes in the application. What I would like to have is, set the parameter in the system level (init.ora or alter system) and no changes in the application. Thanks, "John Lim" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > According to Thies, this is an Oracle bug. A quick workaround which I just > tested is to execute an alter session before updating the LOB, and restore > cursor_sharing=force after the update. > > ALTER SESSION SET cursor_sharing=exact > > Bye, John > > "Prince" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > John! > > > > Thanks for the update. Did you find any work-around for this issue? > > > > Thanks, > > Prince. > > > > "John Lim" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Hmm, I have also been having similar problems with LOBs. However it > might > > > not > > > be cursor_sharing=force, because on my Win 2000 oracle, LOBs work fine > > with > > > PHP > > > with this parameter set. > > > > > > However on our Sun server, PHP crashes as you mention (yes > > > cursor_sharing=force is > > > set here too). > > > > > > PS: this is set in init.ora. > > > > > > > > > > > > > > > "Prince" <[EMAIL PROTECTED]> wrote in message > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > I have the following php code. If I add the parameter > > CURSOR_SHARING=FORCE > > > > > > > > in my init.ora and while executing the program I get the "Segmentation > > > > fault". > > > > > > > > $ /usr/local/php4/bin/php -q curshare.php > > > > > > > > Segmentation fault (core dumped) > > > > > > > > Is there any work-around for this? Is this a bug? This seems to be > > > happening > > > > only when LOB with returning clause is present. > > > > > > > > I tested a similar program from "C" program and is fine. > > > > > > > > Note: currently I have set the parameter (CURSOR_SHARING=FORCE ) only > > in > > > > the program/session level. > > > > > > > > Thanks, > > > > > > > > Prince. > > > > > > > > > > > > > > > > > > > > > > > > $ cat curshare.php > > > > > > > > #!/usr/local/php4/bin/php -q > > > > > > > > <? > > > > > > > > //program name curshare.php > > > > > > > > $conn = OCILogon($dbuser, $dbpass, $dbname); > > > > > > > > //This is added to affect only the current session. > > > > > > > > $sql = "alter session set cursor_sharing=force"; > > > > > > > > $stmt = ociparse($conn,$sql); > > > > > > > > OCIExecute($stmt,OCI_DEFAULT); > > > > > > > > $lob = OCINewDescriptor($conn, OCI_D_LOB); > > > > > > > > $sqlstmt = "insert into blob_test ( packageid, packagebody ) > > > > values('12344321123efd', EMPTY_BLOB()) returning packagebody into > > > > :packagebody"; > > > > > > > > $stmt = OCIParse($conn, $sqlstmt) ; > > > > > > > > OCIBindByName($stmt, ':packagebody', &$lob, -1, OCI_B_BLOB); > > > > > > > > OCIExecute($stmt, OCI_DEFAULT); > > > > > > > > OCICommit($conn); > > > > > > > > OCIFreeDesc($lob); > > > > > > > > OCIFreeStatement($stmt); > > > > > > > > OCILogoff($conn); > > > > > > > > ?> > > > > > > > > > > > > > > > > > > > > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php