NYCPHP Meetup

NYPHP.org

[nycphp-talk] Can't debug error message...

Tim Gales tgales at tgaconnect.com
Fri Aug 27 16:37:33 EDT 2004


Nathan Lavertue writes: 
> Subject: [nycphp-talk] Can't debug error message...
> 
> I keep getting the following error messages with this very 
> small PHP script I'm running.
> 
> ----
> Warning: Unknown: _oci_close_session OCIHandleAlloc
> OCI_HTYPE_SVCCTX: OCI_INVALID_HANDLE in Unknown on line 0
> 
> 

This looks like the Oracle extension is trying to 
tear down the connection to the database after 
the handle is already gone. That is, PHP is in the 
process of shutting down and PHP no longer knows what 
the name of the function that caused the problem is 
or the line number.

You may be able to get some ideas about things to try 
by reading about register_shutdown_function() and 
'Chapter 36. Connection handling' in the PHP manual. 

Do you currently have a function registered as a shutdown 
function?

If you really get desperate you might consider tinkering 
around with ignoring user abort -- ignore_user_abort(). 

I don't know if you can write a function that can successfully 
determine why PHP feels it is time to shut down. That is, 
use connection_timeout() or connection_aborted (maybe 
in some combination with connection_status) and 
register it as a shutdown function in order to log 
the situation -- seems like it might be possible.

T. Gales & Associates
'Helping People Connect with Technology'

http://www.tgaconnect.com


 





More information about the talk mailing list