Re: [PHP4BETA] odbc_close

From: Date: Mon, 13 Mar 2000 01:48:25 +0000
Subject: Re: [PHP4BETA] odbc_close
References: 1 2 3 4  Groups: php.version4 
Request: Send a blank email to php-version4+get-12003@lists.php.net to get a copy of this message
i am convinced that using reference counting and dependicies is a goodthing(tm) for php. if you need a connection|cursor to be closed just set it to 0. that's easy. i actulally believe we should not have a close call any more - being able to close something where some other thing still has open references to it seems a bad idea to me. (that is the way i implemented it in the oci8 driver) the real problem is that if we don't use reference counting but depend on php request-cleanup code the order of cleaning up is undeterministic. connections get closed *before* statements etc - which can caus any kind of headache. when using ref-counting *all* resources will be free in the _right_ order while zend destroys the symbol-table. that basiclly means zend does a unset() on each var of the global scope (function scopes have already been cleaned when returning from them). another plus is that a result set will *work* as long as you have a reference to it. tc On Sun, Mar 12, 2000 at 02:00:56PM -0800, Leo Baschy wrote: > At 11:10 AM 3/12/00 -1000, you wrote: > >I have commented out odbc_close using php4 because it seems to > >give an access violation. NT 4.0 IBM HTTP Server (apache). > >Everything then runs fine. Is there still supposed to be a > >problem with odbc? I'm using the php4 dev5 > > If that works for you that's good, keep it that way. > > Problems occur if you like me use odbc_close() on purpose. > > I'm taking ODBC very far, including actually having written for PHP3 code that gives me > output parameters of procedures (odbc_procedure) and multiple result sets (not just rows) etc (also > something you have asked for). Works fine in PHP3 and now bringing it into PHP4 and releasing it at > the same time (releasing for PHP4 only, PHP3 is dead for me). > While doing that I notice that some things in php_odbc of PHP4b4+ are less than perfect > (some even don't work), and that's what much of this discussion is about. > Great as the new Zend is, not every implication of Zend on php_odbc seems to have been > thought of, by not any party (including myself, but I'm catching up quickly). The current > public discussion of php_odbc on this list is to make sure Windows and Linux people are heard as > well as people with different uses. > Myself I have some pretty big PHP scripts that access many tables (possibly more than one > database) for one page and do quite a lot of processing for one page, so I really use different > features than others who e.g. serve lots of small data (which I do on a few pages only). > > You ask: Is there supposed to be a problem with php_odbc? I think if a user takes PHP3 script > and it crashes unless she removes odbc_close() that _is_ a problem. > > Use it, it soon will be better than PHP3. > > - Leo Baschy <nirvana@got.net> > > > -- > 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 (#12003) next »