Re: LOBS with CURSOR_SHARING=FORCE gives core dump
| From: | John Lim | Date: | Thu, 11 Apr 2002 10:09:02 +0000 |
| Subject: | Re: LOBS with CURSOR_SHARING=FORCE gives core dump | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18420@lists.php.net to get a copy of this message | ||
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" <pkumar@intacct.com> wrote in message
news:20020410014648.11277.qmail@pb1.pair.com...
> 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);
>
> ?>
>
>
>