Re: Bug in xxxxx_close();
| From: | nicos@php.net | Date: | Tue, 16 Sep 2003 07:45:37 +0000 |
| Subject: | Re: Bug in xxxxx_close(); | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4492@lists.php.net to get a copy of this message | ||
"Georg Richter" <georg@php.net> a écrit dans le message de
news:200309132116.45988.georg@php.net...
> Hi,
>
> currently I don't have time to analyze or fix it, so I hope someone will
take
> a look, it affects most of db-extensions which support (optional) default
> connection.
>
> Sample:
>
> <?php
> for ($i=0;$i<1000; $i++) {
> $link = mysql_connect("localhost", "foo", "bar");
> mysql_close();
> }
> ?>
>
> doesn't work correct:
I see, is mysql_close() supposed to close every link opened then ? If so I
could work on a patch soon.
>
> Function _close_mysql_link which was registered via
> zend_register_list_destructors_ex will be called only 1 time at end of
> script. If you specify mysql_close($link) instead, everything works fine.
>
> Georg
--
Regards.
M.CHAILLAN Nicolas
nicos@php.net
www.WorldAKT.com Hébergement de sites internets.