dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-dev] db close


From: Pierre Gotab
Subject: Re: [Dolibarr-dev] db close
Date: Wed, 14 Mar 2012 15:17:49 +0100

>From memory, database connexion is automatically closed at the end of
the execution of the PHP process (unless some esoteric PHP parameter
is set).
Moreover, on standard config, the connexion is kept over executions
(the socket is reused) for the sake of optimization.
I don't know exactly what is behind $db->close but since freeing DB is
a mandatory task which is done automatically by PHP, maybe $db->close
would have to be called through a register_shutdown function?

Pierre GOTAB

2012/3/14 Laurent Destailleur (eldy) <address@hidden>:
> After.
>
> Database handler must be freed at the end, at the last step as we may need
> it until the end.
> For the moment we don't $db into llxFooter, but may be we my need it later
> (for example if we add a hook into footer, we will need it).
>
>
>
> Le 14/03/2012 15:00, Régis Houssin a écrit :
>
>> Laurent,
>>
>> où doit on mettre le $db->close() ?
>>
>> avant ou après le llxFooter() ?
>>
>>
>> Cordialement,
>
>
> --
> Eldy (Laurent Destailleur).
> ---------------------------------------------------------------
> EMail: address@hidden
> Web: http://www.destailleur.fr
>
> Dolibarr (Project leader): http://www.dolibarr.org
> To make a donation for Dolibarr project via Paypal: address@hidden
> AWStats (Author) : http://awstats.sourceforge.net
> To make a donation for AWStats project via Paypal: address@hidden
> AWBot (Author) : http://awbot.sourceforge.net
> CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net
>
>
>
> _______________________________________________
> Dolibarr-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]