[Vtigercrm-developers] Handling "[2006]MySQL server has gone away" error?

Prasad prasad at vtiger.com
Fri Nov 14 16:44:54 GMT 2014


$this->database - connection is no longer valid it should reconnect -
something missing.


Regards,
Prasad

FB <http://www.facebook.com/vtiger> I Twit <http://twitter.com/vtigercrm> I
LIn <https://www.linkedin.com/company/1270573?trk=tyah> I Blog
<https://blogs.vtiger.com> I Website <https://www.vtiger.com/>

On Fri, Nov 14, 2014 at 8:05 PM, Alan Lord <alanslists at gmail.com> wrote:

> On 14/11/14 12:55, Alan Lord wrote:
>
>>
>> Is there a way I can test for a "good" $db object and if it doesn't have
>> a connection close it and get a new one?
>>
>>
> What is this function (in PearDatabase.php) supposed to do exactly?
>
>
>      function checkConnection(){
>>                 global $log;
>>
>>                 if(!isset($this->database)) {
>>                     $this->println("TRANS creating new connection");
>>                     $this->connect(false);
>>                 } else {
>>                     //$this->println("checkconnect using old connection");
>>                 }
>>     }
>>
>
>
> Al
>
>
>  Thanks
>>
>> Al
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141114/80bdbf9e/attachment-0001.html>


More information about the vtigercrm-developers mailing list