Re: [PHP-DB] Re: LOBS with CURSOR_SHARING=FORCE gives core dump

2002-04-16 Thread Prince

Hi  Thies,

Thanks for the response.

I already talked to oracle support and they said they won't support PHP as
they believe its not an OCI problem.

Anyway, I will send you the C program (sample program shipped with oracle) I
was testing with.

You can also find a simple PL/SQL progragram attached below.

Thanks,



declare

pbody blob;

begin

execute immediate 'alter session set cursor_sharing=force';

INSERT into  BLOB_TEST PACKAGEID,PACKAGEBODY )VALUES
('c0a815e3c59ba5332f26390159c98eb',EMPTY_BLOB() ) returning PACKAGEBODY into
pbody;

end ;

/

Thies C. Arntzen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Mon, Apr 15, 2002 at 04:31:06PM -0700, Prince wrote:
  I don't think this is the bug with oracle as I was able to do the same
with
  C program having OCI calls.

 could you please send me this program?

 thanx,
 tc
 
  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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: LOBS with CURSOR_SHARING=FORCE gives core dump

2002-04-15 Thread John Lim

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




[PHP-DB] Re: LOBS with CURSOR_SHARING=FORCE gives core dump

2002-04-15 Thread Prince

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




Re: [PHP-DB] Re: LOBS with CURSOR_SHARING=FORCE gives core dump

2002-04-13 Thread Thies C. Arntzen

On Thu, Apr 11, 2002 at 06:09:02PM +0800, John Lim wrote:
 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.


could one of your please send me a backtrace o fthis crash?
see: http://bugs.php.net/bugs-generating-backtrace.php

re,
tc
 
 
 
 
 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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: LOBS with CURSOR_SHARING=FORCE gives core dump

2002-04-12 Thread Prince

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