dolibarr-dev
[Top][All Lists]
Advanced

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

Re: [Dolibarr-dev] db close


From: Laurent Destailleur (eldy)
Subject: Re: [Dolibarr-dev] db close
Date: Wed, 14 Mar 2012 16:09:02 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

There is already a register_shutdown function to close db if not done by the db->close at end of page (with 3.2 version i think). Also for the moment we prefer keeping an explicit close as we do an implicit connect.

but you're right, it's not so important as PHP do the work for us if not correctly done.



Le 14/03/2012 15:17, Pierre Gotab a écrit :
 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
_______________________________________________
Dolibarr-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

--
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




reply via email to

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