Reconnect database

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
mikatchu
New Member
New Member
Posts: 9
Joined: Sun Dec 28, 2008 10:16 am

Reconnect database

Post by mikatchu »

Hi,

I'd like to know if there is a way to close and reconnect the database connection during the execution of a module action ?

Here is the problem : I execute a long webservice call in my module, that requires around 60 seconds to achieve.
My website host automatically close the cmsms database connection after 45 seconds.

In cmsms 1.9.x, i used to do that if the 45s limitation was exeeded :

Code: Select all

global $gCms;
$gCms->dbshutdown();
unset($gCms->db);
$gCms->GetDb();
It worked fine.
Now in cmsms 1.10.x, the 'db' object is private, so it's impossible to clear it, and I don't see any method to do that... any idea ?

Thanks
Mika
Post Reply

Return to “Developers Discussion”