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

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


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

[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