ID: 30697 Updated by: php-bugs@lists.php.net Reported By: withpaul at yahoo dot com -Status: Feedback +Status: No Feedback Bug Type: OCI8 related Operating System: sparc-sun-solaris2.8 PHP Version: 5.0.2 New Comment:
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". Previous Comments: ------------------------------------------------------------------------ [2005-01-07 16:21:58] marek dot raida at oskar dot cz There is the smallest example was able to prepare. Problem is with calling abc() before connection to Database. OS: SunOS s1self31 5.9 Generic_117171-08 sun4u PHP: PHP Version 5.0.2 OCI Client: --with-oci8=/app/oracle/product/9.2.0.1_client ORACLE: 9.2.0.4.0 (using UTF-8) Are you able to reproduce it? It works 100%l for me.... M.R. -------- <?php function abc(){} function crash($sql,$conn){ $stmt = OCIParse($conn,$sql); return array($stmt,1); } abc(); $conn = ociplogon('wsc_own','wsc_own123','PUB_DEV'); $stmt = crash('select 123 from dual', $conn); var_dump($conn,$stmt); ?> ------------------------------------------------------------------------ [2005-01-07 15:01:04] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2005-01-07 14:24:52] marek dot raida at guide dot cz 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. ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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