[PHP-DB] Problems with 5.0.2 PHP and OCI (9.x)

2004-11-29 Thread kkoehler
I've been playing with PHP 5.0.2 on Red Hat Linux, Apache 2 and Oracle 9i.  
I've seen some of the emails on problems with OCI.  I've experienced problems 
with using both Persistent and non-persistent.  Most of the time when I do 
saves or selects, it works.  Occassionally it can no longer find the 
connection.  Each submit, I open/close connections.  I do not see this problem 
in 4.3.8 (though I'm going to debug further).  I'm recommending here to not use 
5.0.2 but 4.3.8 in production.  Want to verify that these are problems with 
PHP?  Or is this an Oracle issue?

Kathy

[PHP-DB] PHP 5.0.2 bug

2004-11-16 Thread kkoehler
I am getting this:

[Tue Nov 16 06:55:31 2004] [notice] child pid 25537 exit signal
Segmentation fault (11)

When I call this:

header(Location: main.php);

It only appears to happen when I'm making an Oracle database call and
it takes awhile to come back. When I take the Oracle call out, it
doesn't happen. I've debugged further in the Oracle select and it
happens in different parts in my method. I've looked around on the
web and it appears to be a bug in 5.0.x. Has anyone else seen this
problem? I've seen the resolution to upgrade to 5.1.x development. Suggestions? 
 Anything with session settings?  We are using OCI calls.
We are running 5.0.2, Apache 2.0.46, Oracle 9i (9.2) on Red Hat linux 9.

Kathy

[PHP-DB] PHP 4.3.8/Oracle 9i OCI call question for BLOBs

2004-09-22 Thread kkoehler
I'm trying to write text to a BLOB.  I got a valid return code but it did not write 
the BLOB.  I was able to use similar code writing to a CLOB.  Any examples I've seen 
for BLOBs are reading from Binary files.  Here's how I did the CLOB, but it would not 
work for BLOB.  Is this a bug in PHP?

$query = insert into  . getSchema() . attf_description  .
(id, narticid, nordertoprint, vheadertoprint, cldescription )  . 
  values( .
   $id . ,  . $articid . ,  . $ordertoprint . ,'  . $headertoprint . ', 
EMPTY_CLOB()) 
   . returning CLDESCRIPTION into :CLDESCRIPTION;

 $parsed = ociparse($connection,$query);
 $clob = OCINewDescriptor($connection, OCI_D_LOB);
 $bind = OCIBindByName($parsed, $clob_name, $clob, -1, OCI_B_CLOB);
 ociexecute($parsed, OCI_DEFAULT);
  $err = $clob-save($clob_data);
  $committed = ocicommit($connection, OCI_DEFAULT);
   OCIFreeStatement( $parsed );

Thanks,
Kathy

[PHP-DB] PHP 4.3.8/Oracle 9i OCI call question for BLOBs

2004-09-22 Thread kkoehler
One thing I left off.  I changed the Oracle field to a BLOB, replaced OCI_B_CLOB with 
OCI_B_BLOB, the insert was successful but no data was saved to the BLOB.
Kathy

[EMAIL PROTECTED] wrote:
 I'm trying to write text to a BLOB.  I got a valid return code but it did not 
write the BLOB.  I was able to use similar code writing to a CLOB.  Any examples 
I've seen for BLOBs are reading from Binary files.  Here's how I did the CLOB, 
but it would not work for BLOB.  Is this a bug in PHP?
 
 $query = insert into  . getSchema() . attf_description  .
 (id, narticid, nordertoprint, vheadertoprint, cldescription )  . 
   values( .
$id . ,  . $articid . ,  . $ordertoprint . ,'  . $headertoprint . ', 
EMPTY_CLOB()) 
. returning CLDESCRIPTION into :CLDESCRIPTION;
 
  $parsed = ociparse($connection,$query);
  $clob = OCINewDescriptor($connection, OCI_D_LOB);
  $bind = OCIBindByName($parsed, $clob_name, $clob, -1, OCI_B_CLOB);
  ociexecute($parsed, OCI_DEFAULT);
   $err = $clob-save($clob_data);
   $committed = ocicommit($connection, OCI_DEFAULT);
OCIFreeStatement( $parsed );
 
 Thanks,
 Kathy