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

Reply via email to