ID:               37931
 Updated by:       [EMAIL PROTECTED]
 Reported By:      Olaf dot Imig at bifab dot de
-Status:           Open
+Status:           Feedback
 Bug Type:         OCI8 related
 Operating System: Linux(x86)/Solaris(sparc)
 PHP Version:      5.1.4
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Also, I should note that ocilogoff($db) does not do anything with
persistent connections, it just ignores them, so this piece of code
doesn't make much sense.


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

[2006-06-27 16:22:57] Olaf dot Imig at bifab dot de

Ok, I made the test with php5.2-20060627143 on Solaris. I found the
same result.

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

[2006-06-27 15:48:44] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip



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

[2006-06-27 15:34:47] Olaf dot Imig at bifab dot de

Description:
------------
The following behavior ist reproduceable:
-Call the script
-shutdown/startup the Database
-Call the script
=> Apache Instance crash

The bug is forced, when you call the script many times. For the tests I
used the OCI8 stuff from Oracle8i on Solaris and from Oracle8i and
Oracle10g on Linux. The result was the same. Without persistent
connection all is perfect.

Perhaps I can deliver a Solution. I made two changes in the code and
the bug vanished.
After restart of Database php_oci_connection_ping found invalid
connections.
The first problem was here, that the function php_oci_connection_close
was called twice, first time triggered through 
zend_hash_del(&EG(persistent_list)...
and then through a direct call. The Oracle-C-functions don't like this.
Furthermore some pointers was freed twice.
The second problem is the call of OCISessionEnd, when the Connection is
invalid. Setting of connection->is_close=0 before calling
php_oci_connection_close was helpful in this special case.
On demand I can send my patch.




Reproduce code:
---------------
$db=ociplogon("OPASUSER","OPASPASS","TOPASL");
if(!$db){
    print "Connection failed\n";
    exit;
}
ocilogoff($db);



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


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

Reply via email to