ID:               30697
 Comment by:       marek dot raida at guide dot cz
 Reported By:      withpaul at yahoo dot com
 Status:           No Feedback
 Bug Type:         OCI8 related
 Operating System: sparc-sun-solaris2.8
 PHP Version:      5.0.2
 New Comment:

Hi there,
we made some investigation and found 100% way of reproducing error: PHP
Warning:  Unknown: _oci_close_session OCIHandleAlloc OCI_HTYPE_SVCCTX:
OCI_INVALID_HANDLE in Unknown on line 0.
It has to do with creating OCIParse in function/object's method and
returning it as member of array. Mst be not alone in array. Steps.
1. Connect to Oracle
2. Prepare statement inside function and return it in array
3. End script immediatelly (without execution).

Example:
function xxx($sql,$conn){
$stmt = OCIParse($conn,$sql);
return array($sql,$stmt);
}
       $conn = $this->wscDb->connect(); // for example
       $stmt = xxx('select 123 from dual', $conn);
       var_dump($conn,$stmt);
       die('watch crash');

This principle is used in John Lim's ADO DB framework.
My env. is PHP 5.0.x, OCI client 9.x, Solaris.. (as described in
previous report).

I found way to avoid this by returning not simple array, but the same
array as property of object and everything works well. Returning
standar PHP array with more than one member leads to the error.

Hope this will help in finding where the problme lies...

cheers,
Marek R.


Previous Comments:
------------------------------------------------------------------------

[2004-12-21 07:41:40] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2004-12-14 16:56:00] [EMAIL PROTECTED]

marek dot raida at oskar dot cz:
And how do you "close" them? 
ocilogoff() is an empty function, which does nothing for a long time
and personally I can't find any way to "close connection manually".

shawn dot coomey at cubist dot com:
I asked initial reporter to try CVS snapshot and not 5.0.2. Please,
give it a try.

------------------------------------------------------------------------

[2004-12-13 09:15:23] marek dot raida at oskar dot cz

Our problems are now not so often, after we put our manual connection
close to all DB connections before script end, as we trust PHP's auto
close no more. Try the same and perhaps it will help you too.

------------------------------------------------------------------------

[2004-12-07 19:46:28] shawn dot coomey at cubist dot com

Same issue here. Freshly compiled PHP 5.0.2, Apache 1.3.29 (note that
the other folks with the problem are using Apache 2) on Solaris 8 using
the OCI functions to connect to an Oracle 9i database. 

No core dump in my case. Just displaying these errors about 90% of the
time.

------------------------------------------------------------------------

[2004-11-25 01:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/30697

-- 
Edit this bug report at http://bugs.php.net/?id=30697&edit=1

Reply via email to