Re: [PHP4BETA] unixODBC support not working with PHP4beta4

From: Date: Wed, 23 Feb 2000 08:28:37 +0000
Subject: Re: [PHP4BETA] unixODBC support not working with PHP4beta4
References: 1 2  Groups: php.version4 
Request: Send a blank email to php-version4+get-10704@lists.php.net to get a copy of this message
On Wed, Feb 23, 2000 at 09:25:03AM +0100, Andreas Karajannis wrote: > > Hi, > > I've had a look again at odbc module shutdown. The problem is, that Zend > lists are destroyed FIFO. > This means that connections will be closed before their statement > handles, potentially leading to segvs when trying to free an already > freed statement. If you are lucky enough to have a driver manager or > odbc libs that do validation of the handle passed, you can get around > this. > I see the following solutions: > - Destroy Zend lists LIFO instead of FIFO > - Reintroduce the php_register_pre_shutdown() function (is still in > php.h but has vanished?) > - Call zend_hash_apply() in request shutdown to do statement handle > cleanup. the right way would be to use reference counting! add a ref to the connection when a statement if parsed on that connection and do a del_ref in yout statement_dtor routine. that way the order will always be correct. oci8 does this. regards > > What do you think? > > -Andreas > > -- > Andreas Karajannis > GMD National Research Center for Information Technology > Schloss Birlinghoven, D-53754 Sankt Augustin > Phone +49 2241 142948 > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net > -- Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#10704) next »