From:             Olaf dot Imig at bifab dot de
Operating system: Linux(x86)/Solaris(sparc)
PHP version:      5.1.4
PHP Bug Type:     OCI8 related
Bug description:  PHP in Apache crash after Database-Restart while using 
persistent connections

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 bug report at http://bugs.php.net/?id=37931&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37931&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37931&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37931&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37931&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37931&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37931&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37931&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37931&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37931&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37931&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37931&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37931&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37931&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37931&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37931&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37931&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37931&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37931&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37931&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37931&r=mysqlcfg

Reply via email to