>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) <[email protected]>: > 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: [email protected] > Web: http://www.destailleur.fr > > Dolibarr (Project leader): http://www.dolibarr.org > To make a donation for Dolibarr project via Paypal: [email protected] > AWStats (Author) : http://awstats.sourceforge.net > To make a donation for AWStats project via Paypal: [email protected] > AWBot (Author) : http://awbot.sourceforge.net > CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net > > > > _______________________________________________ > Dolibarr-dev mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/dolibarr-dev _______________________________________________ Dolibarr-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
